changeset 2036:2d3e4673d9d4

Update to work with upstream HotSpot 16 and NSS patch. 2010-02-25 Andrew John Hughes <ahughes@redhat.com> * patches/hotspot/hs16/icedtea-params-cast-size_t.patch, * patches/hotspot/hs16/memory-limits.patch: Move to main patches directory. * patches/hotspot/hs16/openjdk-6886353-ignore_deoptimizealot.patch: Dropped, applied upstream. * patches/hotspot/hs16/shark.patch, * patches/hotspot/hs16/zero.patch: Moved to main patches directory. * patches/hotspot/original/icedtea-6778657-f2i-overflow.patch, * patches/hotspot/original/icedtea-6778662-lib64.patch, * patches/hotspot/original/icedtea-6791168.patch, * patches/hotspot/original/icedtea-6793825-includedb.patch, * patches/hotspot/original/icedtea-debuginfo.patch, * patches/hotspot/original/icedtea-params-cast-size_t.patch, * patches/hotspot/original/memory-limits.patch: Obsoleted by move to hs16 upstream. * patches/icedtea-nss-6763530.patch: Applied upstream. * Makefile.am: Update patch list. * hotspot.map: Remove outdated hs16 build. * patches/icedtea-params-cast-size_t.patch, * patches/memory-limits.patch, * patches/shark.patch, * patches/zero.patch: Moved from hotspot/hs16.
author Andrew John Hughes <ahughes@redhat.com>
date Thu, 25 Feb 2010 18:48:18 +0000
parents 1ce502218eb0
children d93c134e3357
files ChangeLog Makefile.am hotspot.map patches/hotspot/hs16/icedtea-params-cast-size_t.patch patches/hotspot/hs16/memory-limits.patch patches/hotspot/hs16/openjdk-6886353-ignore_deoptimizealot.patch patches/hotspot/hs16/shark.patch patches/hotspot/hs16/zero.patch patches/hotspot/original/icedtea-6778657-f2i-overflow.patch patches/hotspot/original/icedtea-6778662-lib64.patch patches/hotspot/original/icedtea-6791168.patch patches/hotspot/original/icedtea-6793825-includedb.patch patches/hotspot/original/icedtea-debuginfo.patch patches/hotspot/original/icedtea-params-cast-size_t.patch patches/hotspot/original/memory-limits.patch patches/icedtea-nss-6763530.patch patches/icedtea-params-cast-size_t.patch patches/memory-limits.patch patches/shark.patch patches/zero.patch
diffstat 20 files changed, 426 insertions(+), 1239 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Feb 21 16:22:17 2010 +0000
+++ b/ChangeLog	Thu Feb 25 18:48:18 2010 +0000
@@ -1,3 +1,31 @@
+2010-02-25 Andrew John Hughes  <ahughes@redhat.com>
+
+	* patches/hotspot/hs16/icedtea-params-cast-size_t.patch,
+	* patches/hotspot/hs16/memory-limits.patch:
+	Move to main patches directory.
+	* patches/hotspot/hs16/openjdk-6886353-ignore_deoptimizealot.patch:
+	Dropped, applied upstream.
+	* patches/hotspot/hs16/shark.patch,
+	* patches/hotspot/hs16/zero.patch:
+	Moved to main patches directory.
+	* patches/hotspot/original/icedtea-6778657-f2i-overflow.patch,
+	* patches/hotspot/original/icedtea-6778662-lib64.patch,
+	* patches/hotspot/original/icedtea-6791168.patch,
+	* patches/hotspot/original/icedtea-6793825-includedb.patch,
+	* patches/hotspot/original/icedtea-debuginfo.patch,
+	* patches/hotspot/original/icedtea-params-cast-size_t.patch,
+	* patches/hotspot/original/memory-limits.patch:
+	Obsoleted by move to hs16 upstream.
+	* patches/icedtea-nss-6763530.patch:
+	Applied upstream.
+	* Makefile.am: Update patch list.
+	* hotspot.map: Remove outdated hs16 build.
+	* patches/icedtea-params-cast-size_t.patch,
+	* patches/memory-limits.patch,
+	* patches/shark.patch,
+	* patches/zero.patch:
+	Moved from hotspot/hs16.
+
 2010-02-17 Andrew John Hughes  <ahughes@redhat.com>
 
 	* Makefile.am:
--- a/Makefile.am	Sun Feb 21 16:22:17 2010 +0000
+++ b/Makefile.am	Thu Feb 25 18:48:18 2010 +0000
@@ -242,7 +242,7 @@
 	patches/icedtea-gcc-suffix.patch \
 	patches/icedtea-gcc-suffix-hotspot.patch \
 	patches/icedtea-bytebuffer-compact.patch \
-	patches/hotspot/$(HSBUILD)/memory-limits.patch \
+	patches/memory-limits.patch \
 	patches/icedtea-sunsrc.patch \
 	patches/icedtea-libraries.patch \
 	patches/icedtea-javafiles.patch \
@@ -262,7 +262,7 @@
 	patches/icedtea-alt-jar.patch \
 	patches/icedtea-jdk-use-ssize_t.patch \
 	patches/icedtea-use-idx_t.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-params-cast-size_t.patch \
+	patches/icedtea-params-cast-size_t.patch \
 	patches/icedtea-clean-crypto.patch \
 	patches/icedtea-shark.patch \
 	patches/icedtea-arch.patch \
@@ -300,7 +300,9 @@
 	patches/icedtea-linux-separate-debuginfo.patch \
 	patches/icedtea-parisc.patch \
 	patches/icedtea-sh4-support.patch \
-	patches/libpng.patch
+	patches/libpng.patch \
+	patches/zero.patch \
+	patches/shark.patch
 
 if WITH_RHINO
 ICEDTEA_PATCHES += \
@@ -343,19 +345,7 @@
 endif
 
 if ENABLE_NSS
-ICEDTEA_PATCHES += patches/icedtea-nss-config.patch \
-		   patches/icedtea-nss-6763530.patch
-endif
-
-if WITH_ALT_HSBUILD
-ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \
-	patches/hotspot/$(HSBUILD)/zero.patch \
-	patches/hotspot/$(HSBUILD)/shark.patch
-else
-ICEDTEA_PATCHES += patches/hotspot/original/icedtea-6778662-lib64.patch \
-	patches/hotspot/original/icedtea-6778657-f2i-overflow.patch \
-	patches/hotspot/original/icedtea-6791168.patch \
-	patches/hotspot/original/icedtea-6793825-includedb.patch
+ICEDTEA_PATCHES += patches/icedtea-nss-config.patch
 endif
 
 ICEDTEA_PATCHES += patches/icedtea-override.patch
--- a/hotspot.map	Sun Feb 21 16:22:17 2010 +0000
+++ b/hotspot.map	Thu Feb 25 18:48:18 2010 +0000
@@ -1,2 +1,1 @@
 # version url changeset md5sum
-hs16 http://hg.openjdk.java.net/hsx/hsx16/master 62926c7f67a3 d683eb501e7ce710198f20f0c127ebbb
--- a/patches/hotspot/hs16/icedtea-params-cast-size_t.patch	Sun Feb 21 16:22:17 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,252 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2009-12-08 23:12:17.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2010-01-11 20:57:36.000000000 +0000
-@@ -941,7 +941,7 @@
-   if (free_percentage < desired_free_percentage) {
-     size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
-     assert(desired_capacity >= capacity(), "invalid expansion size");
--    expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
-+    expand_bytes = MAX2((long unsigned int) (desired_capacity - capacity()), (long unsigned int) MinHeapDeltaBytes);
-   }
-   if (expand_bytes > 0) {
-     if (PrintGCDetails && Verbose) {
-@@ -6095,7 +6095,7 @@
-     HeapWord* curAddr = _markBitMap.startWord();
-     while (curAddr < _markBitMap.endWord()) {
-       size_t remaining  = pointer_delta(_markBitMap.endWord(), curAddr);
--      MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
-+      MemRegion chunk(curAddr, MIN2((size_t) CMSBitMapYieldQuantum, remaining));
-       _markBitMap.clear_large_range(chunk);
-       if (ConcurrentMarkSweepThread::should_yield() &&
-           !foregroundGCIsActive() &&
-@@ -6383,7 +6383,7 @@
-     return;
-   }
-   // Double capacity if possible
--  size_t new_capacity = MIN2(_capacity*2, CMSMarkStackSizeMax);
-+  size_t new_capacity = MIN2((size_t) (_capacity*2), (size_t) CMSMarkStackSizeMax);
-   // Do not give up existing stack until we have managed to
-   // get the double capacity that we desired.
-   ReservedSpace rs(ReservedSpace::allocation_align_size_up(
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2010-01-11 20:48:22.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2010-01-11 20:57:36.000000000 +0000
-@@ -412,7 +412,7 @@
-   _regionStack(),
-   // _finger set in set_non_marking_state
- 
--  _max_task_num(MAX2(ParallelGCThreads, (size_t)1)),
-+  _max_task_num(MAX2((size_t)ParallelGCThreads, (size_t)1)),
-   // _active_tasks set in set_non_marking_state
-   // _tasks set inside the constructor
-   _task_queues(new CMTaskQueueSet((int) _max_task_num)),
-@@ -463,7 +463,7 @@
-   SATBMarkQueueSet& satb_qs = JavaThread::satb_mark_queue_set();
-   satb_qs.set_buffer_size(G1SATBLogBufferSize);
- 
--  int size = (int) MAX2(ParallelGCThreads, (size_t)1);
-+  int size = (int) MAX2((size_t)ParallelGCThreads, (size_t)1);
-   _par_cleanup_thread_state = NEW_C_HEAP_ARRAY(ParCleanupThreadState*, size);
-   for (int i = 0 ; i < size; i++) {
-     _par_cleanup_thread_state[i] = new ParCleanupThreadState;
-@@ -522,7 +522,7 @@
-       _sleep_factor             = sleep_factor;
-       _marking_task_overhead    = marking_task_overhead;
-     } else {
--      _parallel_marking_threads = MAX2((ParallelGCThreads + 2) / 4, (size_t)1);
-+      _parallel_marking_threads = MAX2((size_t)((ParallelGCThreads + 2) / 4), (size_t)1);
-       _sleep_factor             = 0.0;
-       _marking_task_overhead    = 1.0;
-     }
-@@ -649,7 +649,7 @@
- }
- 
- ConcurrentMark::~ConcurrentMark() {
--  int size = (int) MAX2(ParallelGCThreads, (size_t)1);
-+  int size = (int) MAX2((size_t)ParallelGCThreads, (size_t)1);
-   for (int i = 0; i < size; i++) delete _par_cleanup_thread_state[i];
-   FREE_C_HEAP_ARRAY(ParCleanupThreadState*,
-                     _par_cleanup_thread_state);
-@@ -1708,7 +1708,7 @@
-   if (has_aborted()) return;
- 
-   int first = 0;
--  int last = (int)MAX2(ParallelGCThreads, (size_t)1);
-+  int last = (int)MAX2((size_t)ParallelGCThreads, (size_t)1);
-   for (int t = 0; t < last; t++) {
-     UncleanRegionList* list = &_par_cleanup_thread_state[t]->list;
-     assert(list->well_formed(), "Inv");
-@@ -3202,7 +3202,7 @@
-   // of things to do) or totally (at the very end).
-   size_t target_size;
-   if (partially)
--    target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);
-+    target_size = MIN2((size_t)_task_queue->max_elems()/3, (size_t)GCDrainStackTargetSize);
-   else
-     target_size = 0;
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	2009-12-08 23:12:17.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	2010-01-11 20:57:36.000000000 +0000
-@@ -1058,7 +1058,7 @@
- // This can be done by either mutator threads together with the
- // concurrent refinement threads or GC threads.
- int HeapRegionRemSet::num_par_rem_sets() {
--  return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), ParallelGCThreads);
-+  return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), (size_t)ParallelGCThreads);
- }
- 
- HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa,
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2009-12-08 23:12:17.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2010-01-11 20:57:36.000000000 +0000
-@@ -863,8 +863,8 @@
- void PSParallelCompact::initialize_dead_wood_limiter()
- {
-   const size_t max = 100;
--  _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
--  _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
-+  _dwl_mean = double(MIN2((size_t) ParallelOldDeadWoodLimiterMean, max)) / 100.0;
-+  _dwl_std_dev = double(MIN2((size_t) ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
-   _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
-   DEBUG_ONLY(_dwl_initialized = true;)
-   _dwl_adjustment = normal_distribution(1.0);
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2009-12-08 23:12:17.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2010-01-11 20:57:36.000000000 +0000
-@@ -63,7 +63,7 @@
-   _last_used = current_live;
- 
-   // We have different alignment constraints than the rest of the heap.
--  const size_t alignment = MAX2(MinPermHeapExpansion,
-+  const size_t alignment = MAX2((size_t) MinPermHeapExpansion,
-                                 virtual_space()->alignment());
- 
-   // Compute the desired size:
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp	2009-12-08 23:12:17.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	2010-01-11 20:57:36.000000000 +0000
-@@ -281,7 +281,7 @@
-     // yield a size that is too small) and bound it by MaxNewSize above.
-     // Ergonomics plays here by previously calculating the desired
-     // NewSize and MaxNewSize.
--    max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize);
-+    max_new_size = MIN2(MAX2(max_new_size, (size_t)NewSize), (size_t)MaxNewSize);
-   }
-   assert(max_new_size > 0, "All paths should set max_new_size");
- 
-@@ -308,7 +308,7 @@
-       // generally small compared to the NewRatio calculation.
-       _min_gen0_size = NewSize;
-       desired_new_size = NewSize;
--      max_new_size = MAX2(max_new_size, NewSize);
-+      max_new_size = MAX2(max_new_size, (size_t) NewSize);
-     } else {
-       // For the case where NewSize is the default, use NewRatio
-       // to size the minimum and initial generation sizes.
-@@ -316,10 +316,10 @@
-       // NewRatio is overly large, the resulting sizes can be too
-       // small.
-       _min_gen0_size = MAX2(scale_by_NewRatio_aligned(min_heap_byte_size()),
--                          NewSize);
-+                          (size_t) NewSize);
-       desired_new_size =
-         MAX2(scale_by_NewRatio_aligned(initial_heap_byte_size()),
--             NewSize);
-+             (size_t) NewSize);
-     }
- 
-     assert(_min_gen0_size > 0, "Sanity check");
-@@ -374,14 +374,14 @@
-       // Adjust gen0 down to accomodate OldSize
-       *gen0_size_ptr = heap_size - min_gen0_size;
-       *gen0_size_ptr =
--        MAX2((uintx)align_size_down(*gen0_size_ptr, min_alignment()),
-+        MAX2((size_t)align_size_down(*gen0_size_ptr, min_alignment()),
-              min_alignment());
-       assert(*gen0_size_ptr > 0, "Min gen0 is too large");
-       result = true;
-     } else {
-       *gen1_size_ptr = heap_size - *gen0_size_ptr;
-       *gen1_size_ptr =
--        MAX2((uintx)align_size_down(*gen1_size_ptr, min_alignment()),
-+        MAX2((size_t)align_size_down(*gen1_size_ptr, min_alignment()),
-                        min_alignment());
-     }
-   }
-@@ -405,7 +405,7 @@
-   // for setting the gen1 maximum.
-   _max_gen1_size = max_heap_byte_size() - _max_gen0_size;
-   _max_gen1_size =
--    MAX2((uintx)align_size_down(_max_gen1_size, min_alignment()),
-+    MAX2((size_t)align_size_down(_max_gen1_size, min_alignment()),
-          min_alignment());
-   // If no explicit command line flag has been set for the
-   // gen1 size, use what is left for gen1.
-@@ -419,11 +419,11 @@
-       "gen0 has an unexpected minimum size");
-     set_min_gen1_size(min_heap_byte_size() - min_gen0_size());
-     set_min_gen1_size(
--      MAX2((uintx)align_size_down(_min_gen1_size, min_alignment()),
-+      MAX2((size_t)align_size_down(_min_gen1_size, min_alignment()),
-            min_alignment()));
-     set_initial_gen1_size(initial_heap_byte_size() - initial_gen0_size());
-     set_initial_gen1_size(
--      MAX2((uintx)align_size_down(_initial_gen1_size, min_alignment()),
-+      MAX2((size_t)align_size_down(_initial_gen1_size, min_alignment()),
-            min_alignment()));
- 
-   } else {
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2009-12-08 23:12:17.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2010-01-11 20:57:36.000000000 +0000
-@@ -221,7 +221,7 @@
-   size_t init_sz;
- 
-   if (TLABSize > 0) {
--    init_sz = MIN2(TLABSize / HeapWordSize, max_size());
-+    init_sz = MIN2((size_t) (TLABSize / HeapWordSize), max_size());
-   } else if (global_stats() == NULL) {
-     // Startup issue - main thread initialized before heap initialized.
-     init_sz = min_size();
-diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2010-01-11 20:48:21.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2010-01-11 20:59:44.000000000 +0000
-@@ -1071,7 +1071,7 @@
-     // NewSize was set on the command line and it is larger than
-     // preferred_max_new_size.
-     if (!FLAG_IS_DEFAULT(NewSize)) {   // NewSize explicitly set at command-line
--      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
-+      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t) NewSize, preferred_max_new_size));
-     } else {
-       FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
-     }
-@@ -1090,7 +1090,7 @@
-     // there was no obvious reason.  Also limit to the case where
-     // MaxNewSize has not been set.
- 
--    FLAG_SET_ERGO(intx, NewRatio, MAX2(NewRatio, new_ratio));
-+    FLAG_SET_ERGO(intx, NewRatio, MAX2((intx) NewRatio, new_ratio));
- 
-     // Code along this path potentially sets NewSize and OldSize
- 
-@@ -1132,8 +1132,8 @@
-       // Unless explicitly requested otherwise, make young gen
-       // at least min_new, and at most preferred_max_new_size.
-       if (FLAG_IS_DEFAULT(NewSize)) {
--        FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new));
--        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize));
-+	FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t) NewSize, min_new));
-+        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t) NewSize));
-         if (PrintGCDetails && Verbose) {
-           // Too early to use gclog_or_tty
-           tty->print_cr("Ergo set NewSize: " SIZE_FORMAT, NewSize);
-@@ -1144,7 +1144,7 @@
-       // later NewRatio will decide how it grows; see above.
-       if (FLAG_IS_DEFAULT(OldSize)) {
-         if (max_heap > NewSize) {
--          FLAG_SET_ERGO(uintx, OldSize, MIN2(3*NewSize, max_heap - NewSize));
-+	  FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t) 3*NewSize, max_heap - (size_t) NewSize));
-           if (PrintGCDetails && Verbose) {
-             // Too early to use gclog_or_tty
-             tty->print_cr("Ergo set OldSize: " SIZE_FORMAT, OldSize);
--- a/patches/hotspot/hs16/memory-limits.patch	Sun Feb 21 16:22:17 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp
---- openjdk.orig/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp	2009-12-08 23:12:17.000000000 +0000
-+++ openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp	2010-01-11 20:44:32.000000000 +0000
-@@ -95,7 +95,7 @@
- 
- // Heap related flags
- define_pd_global(uintx,PermSize,    ScaleForWordSize(16*M));
--define_pd_global(uintx,MaxPermSize, ScaleForWordSize(64*M));
-+define_pd_global(uintx,MaxPermSize, ScaleForWordSize(128*M));
- 
- // Ergonomics related flags
- define_pd_global(bool, NeverActAsServerClassMachine, false);
-diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp openjdk/hotspot/src/share/vm/runtime/globals.hpp
---- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp	2009-12-08 23:12:17.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	2010-01-11 20:45:17.000000000 +0000
-@@ -2809,7 +2809,7 @@
-   product(uintx, InitialHeapSize, 0,                                        \
-           "Initial heap size (in bytes); zero means OldSize + NewSize")     \
-                                                                             \
--  product(uintx, MaxHeapSize, ScaleForWordSize(96*M),                       \
-+  product(uintx, MaxHeapSize, ScaleForWordSize(512*M),                      \
-           "Maximum heap size (in bytes)")                                   \
-                                                                             \
-   product(uintx, OldSize, ScaleForWordSize(4*M),                            \
--- a/patches/hotspot/hs16/openjdk-6886353-ignore_deoptimizealot.patch	Sun Feb 21 16:22:17 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-# HG changeset patch
-# User andrew
-# Date 1254183265 25200
-# Node ID d6b9fd78f38951b6c8b2912701f52aa9fbc08a63
-# Parent  ddd6f1182ae3c0014cbc139952ba8d9d14bfb3d1
-6886353: For DeoptimizeALot, JTreg tests should "IgnoreUnrecognizedVMOptions on a product build
-Summary: Add IgnoreUnrecognizedVMOptions for JTreg tests (on a product build) to pass with DeoptimizeALot
-Reviewed-by: kvn
-
-diff -r ddd6f1182ae3 -r d6b9fd78f389 test/compiler/6823453/Test.java
---- openjdk/hotspot/test/compiler/6823453/Test.java	Fri Sep 25 13:26:02 2009 -0700
-+++ openjdk/hotspot/test/compiler/6823453/Test.java	Mon Sep 28 17:14:25 2009 -0700
-@@ -26,7 +26,7 @@
-  * @test
-  * @bug 6823453
-  * @summary DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
-- * @run main/othervm -Xcomp -XX:CompileOnly=Test -XX:+DeoptimizeALot Test
-+ * @run main/othervm -Xcomp -XX:+IgnoreUnrecognizedVMOptions -XX:CompileOnly=Test -XX:+DeoptimizeALot Test
-  */
- 
- public class Test {
-diff -r ddd6f1182ae3 -r d6b9fd78f389 test/compiler/6833129/Test.java
---- openjdk/hotspot/test/compiler/6833129/Test.java	Fri Sep 25 13:26:02 2009 -0700
-+++ openjdk/hotspot/test/compiler/6833129/Test.java	Mon Sep 28 17:14:25 2009 -0700
-@@ -25,7 +25,7 @@
-  * @test
-  * @bug 6833129
-  * @summary Object.clone() and Arrays.copyOf ignore coping with -XX:+DeoptimizeALot
-- * @run main/othervm -Xbatch -XX:+DeoptimizeALot Test
-+ * @run main/othervm -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:+DeoptimizeALot Test
-  */
- 
- public class Test{
--- a/patches/hotspot/hs16/shark.patch	Sun Feb 21 16:22:17 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
---- openjdk.orig/hotspot/src/cpu//zero/vm/shark_globals_zero.hpp	2009-09-10 15:36:58.658607552 +0100
-+++ openjdk/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp	2010-01-13 14:57:16.000000000 +0000
-@@ -59,5 +59,5 @@
- define_pd_global(uintx, PermSize,                     12*M );
- define_pd_global(uintx, MaxPermSize,                  64*M );
- define_pd_global(bool,  NeverActAsServerClassMachine, true );
--define_pd_global(uintx, DefaultMaxRAM,                1*G  );
-+define_pd_global(uint64_t,MaxRAM,                    1ULL*G);
- define_pd_global(bool,  CICompileOSR,                 true );
--- a/patches/hotspot/hs16/zero.patch	Sun Feb 21 16:22:17 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp
---- openjdk.orig/hotspot/src/cpu/zero/vm/assembler_zero.cpp	Mon Oct 26 23:26:33 2009 +0000
-+++ openjdk/hotspot/src/cpu/zero/vm/assembler_zero.cpp	Tue Oct 27 15:06:00 2009 +0000
-@@ -54,6 +54,12 @@
-   sync();
- }
- 
-+RegisterOrConstant MacroAssembler::delayed_value_impl(intptr_t* delayed_value_addr,
-+						      Register tmpl, int offset) 
-+{
-+  Unimplemented();
-+}
-+
- void MacroAssembler::store_oop(jobject obj) {
-   code_section()->relocate(pc(), oop_Relocation::spec_for_immediate());
-   emit_address((address) obj);
-diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp
---- openjdk.orig/hotspot/src/cpu/zero/vm/assembler_zero.hpp	Mon Oct 26 23:26:33 2009 +0000
-+++ openjdk/hotspot/src/cpu/zero/vm/assembler_zero.hpp	Tue Oct 27 15:06:00 2009 +0000
-@@ -47,7 +47,8 @@
-   void align(int modulus);
-   void bang_stack_with_offset(int offset);
-   bool needs_explicit_null_check(intptr_t offset);
--
-+  RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr,
-+					Register tmp, int offset);
-  public:
-   void advance(int bytes);
-   void store_oop(jobject obj);
-diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
---- openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Mon Oct 26 23:26:33 2009 +0000
-+++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Tue Oct 27 15:06:00 2009 +0000
-@@ -759,6 +759,10 @@
-     entry_point = ((InterpreterGenerator*) this)->generate_abstract_entry();
-     break;
- 
-+  case Interpreter::method_handle:
-+    entry_point = ((InterpreterGenerator*)this)->generate_method_handle_entry();
-+    break;
-+
-   case Interpreter::java_lang_math_sin:
-   case Interpreter::java_lang_math_cos:
-   case Interpreter::java_lang_math_tan:
-diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/frame_zero.cpp
---- openjdk.orig/hotspot/src/cpu/zero/vm/frame_zero.cpp	Mon Oct 26 23:26:33 2009 +0000
-+++ openjdk/hotspot/src/cpu/zero/vm/frame_zero.cpp	Tue Oct 27 15:06:00 2009 +0000
-@@ -166,7 +166,7 @@
-   return type;
- }
- 
--int frame::frame_size() const {
-+int frame::frame_size(RegisterMap* map) const {
- #ifdef PRODUCT
-   ShouldNotCallThis();
- #else
-diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp
---- openjdk.orig/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp	Mon Oct 26 23:26:33 2009 +0000
-+++ openjdk/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp	Tue Oct 27 15:06:00 2009 +0000
-@@ -28,4 +28,7 @@
- class InterpreterMacroAssembler : public MacroAssembler {
-  public:
-   InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code) {}
-+  RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr, Register tmp, int offset) {
-+    Unimplemented();
-+  }
- };
-diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp
---- openjdk.orig/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp	Mon Oct 26 23:26:33 2009 +0000
-+++ openjdk/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp	Tue Oct 27 15:06:00 2009 +0000
-@@ -34,3 +34,4 @@
-   address generate_math_entry(AbstractInterpreter::MethodKind kind);
-   address generate_empty_entry();
-   address generate_accessor_entry();
-+  address generate_method_handle_entry();
-diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp
---- openjdk.orig/hotspot/src/cpu/zero/vm/interpreter_zero.cpp	Mon Oct 26 23:26:33 2009 +0000
-+++ openjdk/hotspot/src/cpu/zero/vm/interpreter_zero.cpp	Tue Oct 27 15:06:00 2009 +0000
-@@ -43,6 +43,11 @@
-   return ShouldNotCallThisEntry();
- }
- 
-+address InterpreterGenerator::generate_method_handle_entry()
-+{
-+  return ShouldNotCallThisEntry();
-+}
-+
- int AbstractInterpreter::size_activation(methodOop method,
-                                          int tempcount,
-                                          int popframe_extra_args,
-diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/register_zero.hpp
---- openjdk.orig/hotspot/src/cpu/zero/vm/register_zero.hpp	Mon Oct 26 23:26:33 2009 +0000
-+++ openjdk/hotspot/src/cpu/zero/vm/register_zero.hpp	Tue Oct 27 15:06:00 2009 +0000
-@@ -106,3 +106,5 @@
-   static const int max_gpr;
-   static const int max_fpr;
- };
-+
-+CONSTANT_REGISTER_DECLARATION(Register, noreg, (-1));
-diff -r 7d2ae1d67c95 ports/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp
---- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp	Mon Oct 26 23:26:33 2009 +0000
-+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp	Tue Oct 27 15:06:00 2009 +0000
-@@ -41,3 +41,5 @@
- define_pd_global(uintx, JVMInvokeMethodSlack,    8192);
- 
- define_pd_global(bool,  UseVectoredExceptions,   false);
-+// Only used on 64 bit platforms
-+define_pd_global(uintx, HeapBaseMinAddress,      2*G);
--- a/patches/hotspot/original/icedtea-6778657-f2i-overflow.patch	Sun Feb 21 16:22:17 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-diff -r dcb49b482348 -r f63a8dee04ae openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp
---- openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Mon Nov 03 14:00:57 2008 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Mon Nov 03 15:56:17 2008 +0000
-@@ -173,64 +173,46 @@ JRT_END
- 
- 
- JRT_LEAF(jint, SharedRuntime::f2i(jfloat  x))
--  if (g_isnan(x)) {return 0;}
--  jlong lltmp = (jlong)x;
--  jint ltmp   = (jint)lltmp;
--  if (ltmp == lltmp) {
--    return ltmp;
--  } else {
--    if (x < 0) {
--      return min_jint;
--    } else {
--      return max_jint;
--    }
--  }
-+  if (g_isnan(x))
-+    return 0;
-+  if (x >= (jfloat) max_jint)
-+    return max_jint;
-+  if (x <= (jfloat) min_jint)
-+    return min_jint;
-+  return (jint) x;
- JRT_END
- 
- 
- JRT_LEAF(jlong, SharedRuntime::f2l(jfloat  x))  
--  if (g_isnan(x)) {return 0;}
--  jlong lltmp = (jlong)x;
--  if (lltmp != min_jlong) {
--    return lltmp;
--  } else {
--    if (x < 0) {
--      return min_jlong;
--    } else {
--      return max_jlong;
--    }
--  }
-+  if (g_isnan(x))
-+    return 0;
-+  if (x >= (jfloat) max_jlong)
-+    return max_jlong;
-+  if (x <= (jfloat) min_jlong)
-+    return min_jlong;
-+  return (jlong) x;
- JRT_END
- 
- 
- JRT_LEAF(jint, SharedRuntime::d2i(jdouble x))
--  if (g_isnan(x)) {return 0;}
--  jlong lltmp = (jlong)x;
--  jint ltmp   = (jint)lltmp;
--  if (ltmp == lltmp) {
--    return ltmp;
--  } else {
--    if (x < 0) {
--      return min_jint;
--    } else {
--      return max_jint;
--    }
--  }
-+  if (g_isnan(x))
-+    return 0;
-+  if (x >= (jdouble) max_jint)
-+    return max_jint;
-+  if (x <= (jdouble) min_jint)
-+    return min_jint;
-+  return (jint) x;
- JRT_END
- 
- 
- JRT_LEAF(jlong, SharedRuntime::d2l(jdouble x))
--  if (g_isnan(x)) {return 0;}
--  jlong lltmp = (jlong)x;
--  if (lltmp != min_jlong) {
--    return lltmp;
--  } else {
--    if (x < 0) {
--      return min_jlong;
--    } else {
--      return max_jlong;
--    }
--  }
-+  if (g_isnan(x))
-+    return 0;
-+  if (x >= (jdouble) max_jlong)
-+    return max_jlong;
-+  if (x <= (jdouble) min_jlong)
-+    return min_jlong;
-+  return (jlong) x;
- JRT_END
- 
- 
--- a/patches/hotspot/original/icedtea-6778662-lib64.patch	Sun Feb 21 16:22:17 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
---- origopenjdk/hotspot/src/os/linux/vm/os_linux.cpp	2008-01-04 18:11:53.000000000 -0500
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2008-04-21 14:00:59.000000000 -0400
-@@ -265,7 +265,12 @@
-  *	  ...
-  *	  7: The default directories, normally /lib and /usr/lib.
-  */
--#define DEFAULT_LIBPATH	"/lib:/usr/lib"
-+
-+#if defined(AMD64) || defined(_LP64) && (defined(PPC) || defined(S390))
-+#define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
-+#else
-+#define DEFAULT_LIBPATH	"/lib:/usr/lib"
-+#endif
- 
- #define EXTENSIONS_DIR	"/lib/ext"
- #define ENDORSED_DIR	"/lib/endorsed"
--- a/patches/hotspot/original/icedtea-6791168.patch	Sun Feb 21 16:22:17 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,230 +0,0 @@
---- openjdk/hotspot/src/cpu/x86/vm/cppInterpreter_x86.cpp.orig	2009-01-13 10:15:42.000000000 +0000
-+++ openjdk/hotspot/src/cpu/x86/vm/cppInterpreter_x86.cpp	2009-01-13 10:17:05.000000000 +0000
-@@ -594,7 +594,7 @@
-   __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), rax);
- 
-   // for c++ interpreter can rsi really be munged?
--  __ lea(state, Address(rbp, -sizeof(BytecodeInterpreter)));                               // restore state
-+  __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter)));                               // restore state
-   __ movptr(rbx, Address(state, byte_offset_of(BytecodeInterpreter, _method)));            // restore method
-   __ movptr(rdi, Address(state, byte_offset_of(BytecodeInterpreter, _locals)));            // get locals pointer
- 
-@@ -658,7 +658,7 @@
-     const Address size_of_stack    (rbx, methodOopDesc::max_stack_offset());
-     // Always give one monitor to allow us to start interp if sync method.
-     // Any additional monitors need a check when moving the expression stack
--    const one_monitor = frame::interpreter_frame_monitor_size() * wordSize;
-+    const int one_monitor = frame::interpreter_frame_monitor_size() * wordSize;
-   __ load_unsigned_word(rax, size_of_stack);                            // get size of expression stack in words
-   __ lea(rax, Address(noreg, rax, Interpreter::stackElementScale(), one_monitor));
-   __ lea(rax, Address(rax, rdx, Interpreter::stackElementScale(), overhead_size));
-@@ -1829,7 +1829,7 @@
-   Label unwind_and_forward;
- 
-   // restore state pointer.
--  __ lea(state, Address(rbp,  -sizeof(BytecodeInterpreter)));
-+  __ lea(state, Address(rbp,  -(int)sizeof(BytecodeInterpreter)));
- 
-   __ movptr(rbx, STATE(_method));                       // get method
- #ifdef _LP64
-@@ -1877,14 +1877,14 @@
- 
-   // The FPU stack is clean if UseSSE >= 2 but must be cleaned in other cases
-   if (UseSSE < 2) {
--    __ lea(state, Address(rbp,  -sizeof(BytecodeInterpreter)));
-+    __ lea(state, Address(rbp,  -(int)sizeof(BytecodeInterpreter)));
-     __ movptr(rbx, STATE(_result._to_call._callee));                   // get method just executed
-     __ movl(rcx, Address(rbx, methodOopDesc::result_index_offset()));
-     __ cmpl(rcx, AbstractInterpreter::BasicType_as_index(T_FLOAT));    // Result stub address array index
-     __ jcc(Assembler::equal, do_float);
-     __ cmpl(rcx, AbstractInterpreter::BasicType_as_index(T_DOUBLE));    // Result stub address array index
-     __ jcc(Assembler::equal, do_double);
--#ifdef COMPILER2
-+#if !defined(_LP64) || defined(COMPILER1) || !defined(COMPILER2)
-     __ empty_FPU_stack();
- #endif // COMPILER2
-     __ jmp(done_conv);
-@@ -1928,7 +1928,7 @@
- 
-   // Restore rsi/r13 as compiled code may not preserve it
- 
--  __ lea(state, Address(rbp,  -sizeof(BytecodeInterpreter)));
-+  __ lea(state, Address(rbp,  -(int)sizeof(BytecodeInterpreter)));
- 
-   // restore stack to what we had when we left (in case i2c extended it)
- 
-@@ -1942,7 +1942,7 @@
- #else
-   __ movptr(rcx, STATE(_thread));                       // get thread
-   __ cmpptr(Address(rcx, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
--#endif / __LP64
-+#endif // _LP64
-   __ jcc(Assembler::notZero, return_with_exception);
- 
-   // get method just executed
---- openjdk/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp.orig	2009-01-13 10:15:42.000000000 +0000
-+++ openjdk/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp	2009-01-13 10:17:05.000000000 +0000
-@@ -139,7 +139,7 @@
- #ifdef CC_INTERP
- 
- inline interpreterState frame::get_interpreterState() const {
--  return ((interpreterState)addr_at( -sizeof(BytecodeInterpreter)/wordSize ));
-+  return ((interpreterState)addr_at( -((int)sizeof(BytecodeInterpreter))/wordSize ));
- }
- 
- inline intptr_t*    frame::sender_sp()        const {
---- openjdk/hotspot/src/cpu/x86/vm/assembler_x86.cpp.orig	2009-01-13 10:15:42.000000000 +0000
-+++ openjdk/hotspot/src/cpu/x86/vm/assembler_x86.cpp	2009-01-13 10:17:05.000000000 +0000
-@@ -6943,29 +6943,32 @@
- 
-   Label slow_case, done;
- 
--  // x ?<= pi/4
--  fld_d(ExternalAddress((address)&pi_4));
--  fld_s(1);                // Stack:  X  PI/4  X
--  fabs();                  // Stack: |X| PI/4  X
--  fcmp(tmp);
--  jcc(Assembler::above, slow_case);
--
--  // fastest case: -pi/4 <= x <= pi/4
--  switch(trig) {
--  case 's':
--    fsin();
--    break;
--  case 'c':
--    fcos();
--    break;
--  case 't':
--    ftan();
--    break;
--  default:
--    assert(false, "bad intrinsic");
--    break;
-+  ExternalAddress pi4_adr = (address)&pi_4;
-+  if (reachable(pi4_adr)) {
-+    // x ?<= pi/4
-+    fld_d(pi4_adr); // ExternalAddress((address)&pi_4));
-+    fld_s(1);                // Stack:  X  PI/4  X
-+    fabs();                  // Stack: |X| PI/4  X
-+    fcmp(tmp);
-+    jcc(Assembler::above, slow_case);
-+
-+    // fastest case: -pi/4 <= x <= pi/4
-+    switch(trig) {
-+    case 's':
-+      fsin();
-+      break;
-+    case 'c':
-+      fcos();
-+      break;
-+    case 't':
-+      ftan();
-+      break;
-+    default:
-+      assert(false, "bad intrinsic");
-+      break;
-+    }
-+    jmp(done);
-   }
--  jmp(done);
- 
-   // slow case: runtime call
-   bind(slow_case);
---- openjdk/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp.orig	2009-01-13 10:15:42.000000000 +0000
-+++ openjdk/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	2009-01-13 10:17:05.000000000 +0000
-@@ -2954,10 +2954,16 @@
-   __ pushptr(Address(rcx, 0));     // Save return address
-   __ enter();                      // Save old & set new rbp
-   __ subptr(rsp, rbx);             // Prolog
-+#ifdef CC_INTERP
-+  __ movptr(Address(rbp,
-+                  -(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))),
-+            sender_sp); // Make it walkable
-+#else // CC_INTERP
-   __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize),
-             sender_sp);            // Make it walkable
-   // This value is corrected by layout_activation_impl
-   __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD );
-+#endif // CC_INTERP
-   __ mov(sender_sp, rsp);          // Pass sender_sp to next frame
-   __ addptr(rsi, wordSize);        // Bump array pointer (sizes)
-   __ addptr(rcx, wordSize);        // Bump array pointer (pcs)
---- openjdk/hotspot/src/cpu/x86/vm/bytecodeInterpreter_x86.inline.hpp.orig	2009-01-13 10:15:42.000000000 +0000
-+++ openjdk/hotspot/src/cpu/x86/vm/bytecodeInterpreter_x86.inline.hpp	2009-01-13 10:17:05.000000000 +0000
-@@ -213,7 +213,7 @@
- 
- inline jint BytecodeInterpreter::VMintDiv(jint op1, jint op2) {
-   /* it's possible we could catch this special case implicitly */
--  if (op1 == 0x80000000 && op2 == -1) return op1;
-+  if ((juint)op1 == 0x80000000 && op2 == -1) return op1;
-   else return op1 / op2;
- }
- 
-@@ -231,7 +231,7 @@
- 
- inline jint BytecodeInterpreter::VMintRem(jint op1, jint op2) {
-   /* it's possible we could catch this special case implicitly */
--  if (op1 == 0x80000000 && op2 == -1) return 0;
-+  if ((juint)op1 == 0x80000000 && op2 == -1) return 0;
-   else return op1 % op2;
- }
- 
---- openjdk/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp.orig	2009-01-13 10:15:42.000000000 +0000
-+++ openjdk/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp	2009-01-13 10:17:05.000000000 +0000
-@@ -30,7 +30,7 @@
- 
- #ifdef CC_INTERP
- void InterpreterMacroAssembler::get_method(Register reg) {
--  movptr(reg, Address(rbp, -(sizeof(BytecodeInterpreter) + 2 * wordSize)));
-+  movptr(reg, Address(rbp, -((int)sizeof(BytecodeInterpreter) + 2 * wordSize)));
-   movptr(reg, Address(reg, byte_offset_of(BytecodeInterpreter, _method)));
- }
- #endif // CC_INTERP
---- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp.orig	2009-01-13 10:16:45.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp	2009-01-13 10:17:05.000000000 +0000
-@@ -163,7 +163,7 @@
- #ifdef USELABELS
- // Have to do this dispatch this way in C++ because otherwise gcc complains about crossing an
- // initialization (which is is the initialization of the table pointer...)
--#define DISPATCH(opcode) goto *dispatch_table[opcode]
-+#define DISPATCH(opcode) goto *(void*)dispatch_table[opcode]
- #define CONTINUE {                              \
-         opcode = *pc;                           \
-         DO_UPDATE_INSTRUCTION_COUNT(opcode);    \
-@@ -341,7 +341,7 @@
-  */
- #undef CHECK_NULL
- #define CHECK_NULL(obj_)                                                 \
--    if ((obj_) == 0) {                                                   \
-+    if ((obj_) == NULL) {                                                \
-         VM_JAVA_ERROR(vmSymbols::java_lang_NullPointerException(), "");  \
-     }
- 
-@@ -1362,7 +1362,7 @@
- 
- #define NULL_COMPARISON_NOT_OP(name)                                         \
-       CASE(_if##name): {                                                     \
--          int skip = (!(STACK_OBJECT(-1) == 0))                              \
-+          int skip = (!(STACK_OBJECT(-1) == NULL))                           \
-                       ? (int16_t)Bytes::get_Java_u2(pc + 1) : 3;             \
-           address branch_pc = pc;                                            \
-           UPDATE_PC_AND_TOS(skip, -1);                                       \
-@@ -1372,7 +1372,7 @@
- 
- #define NULL_COMPARISON_OP(name)                                             \
-       CASE(_if##name): {                                                     \
--          int skip = ((STACK_OBJECT(-1) == 0))                               \
-+          int skip = ((STACK_OBJECT(-1) == NULL))                            \
-                       ? (int16_t)Bytes::get_Java_u2(pc + 1) : 3;             \
-           address branch_pc = pc;                                            \
-           UPDATE_PC_AND_TOS(skip, -1);                                       \
---- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp.orig	2009-01-13 10:15:42.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	2009-01-13 10:17:05.000000000 +0000
-@@ -66,7 +66,6 @@
- friend class InterpreterGenerator;
- friend class InterpreterMacroAssembler;
- friend class frame;
--friend class SharedRuntime;
- friend class VMStructs;
- 
- public:
--- a/patches/hotspot/original/icedtea-6793825-includedb.patch	Sun Feb 21 16:22:17 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
---- openjdk/hotspot/src/share/vm/includeDB_compiler2.orig	2009-01-13 10:10:44.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/includeDB_compiler2	2009-01-13 10:11:17.000000000 +0000
-@@ -140,6 +140,7 @@
- c2_globals_<os_family>.hpp              macros.hpp
- 
- c2_init_<arch>.cpp                      compile.hpp
-+c2_init_<arch>.cpp                      node.hpp
- 
- c2compiler.cpp                          ad_<arch_model>.hpp
- c2compiler.cpp                          c2compiler.hpp
-@@ -839,6 +840,7 @@
- phase.cpp                               compile.hpp
- phase.cpp                               compileBroker.hpp
- phase.cpp                               nmethod.hpp
-+phase.cpp                               node.hpp
- phase.cpp                               phase.hpp
- 
- phase.hpp                               port.hpp
---- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1.orig	2009-01-13 10:10:44.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1	2009-01-13 10:11:17.000000000 +0000
-@@ -34,6 +34,7 @@
- collectionSetChooser.cpp		g1CollectedHeap.hpp
- collectionSetChooser.cpp		g1CollectorPolicy.hpp
- collectionSetChooser.cpp		collectionSetChooser.hpp
-+collectionSetChooser.cpp		space.inline.hpp
- 
- collectionSetChooser.hpp		heapRegion.hpp
- collectionSetChooser.hpp                growableArray.hpp
-@@ -44,6 +45,7 @@
- concurrentG1Refine.cpp			copy.hpp
- concurrentG1Refine.cpp			g1CollectedHeap.hpp
- concurrentG1Refine.cpp			g1RemSet.hpp
-+concurrentG1Refine.cpp			space.inline.hpp
- 
- concurrentG1Refine.hpp			globalDefinitions.hpp
- 
-@@ -264,7 +266,7 @@
- heapRegion.cpp                          iterator.hpp
- heapRegion.cpp                          oop.inline.hpp
- 
--heapRegion.hpp                          space.hpp
-+heapRegion.hpp                          space.inline.hpp
- heapRegion.hpp                          spaceDecorator.hpp
- heapRegion.hpp                          g1BlockOffsetTable.inline.hpp
- heapRegion.hpp                          watermark.hpp
---- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge.orig	2009-01-13 10:10:44.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge	2009-01-13 10:11:17.000000000 +0000
-@@ -306,6 +306,8 @@
- psPermGen.cpp                           psMarkSweepDecorator.hpp
- psPermGen.cpp                           psParallelCompact.hpp
- psPermGen.cpp                           psPermGen.hpp
-+psPermGen.cpp                           markOop.inline.hpp
-+psPermGen.cpp                           markSweep.inline.hpp
- 
- psPermGen.hpp                           psOldGen.hpp
- 
---- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep.orig	2009-01-13 10:10:44.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep	2009-01-13 10:11:17.000000000 +0000
-@@ -28,6 +28,7 @@
- binaryTreeDictionary.cpp                binaryTreeDictionary.hpp
- binaryTreeDictionary.cpp                globals.hpp
- binaryTreeDictionary.cpp                ostream.hpp
-+binaryTreeDictionary.cpp                space.inline.hpp
- binaryTreeDictionary.cpp                spaceDecorator.hpp
- 
- binaryTreeDictionary.hpp                freeBlockDictionary.hpp
---- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew.orig	2009-01-13 10:10:44.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew	2009-01-13 10:11:17.000000000 +0000
-@@ -29,6 +29,8 @@
- asParNewGeneration.cpp                  cmsAdaptiveSizePolicy.hpp
- asParNewGeneration.cpp                  cmsGCAdaptivePolicyCounters.hpp
- asParNewGeneration.cpp                  defNewGeneration.inline.hpp
-+asParNewGeneration.cpp                  markOop.inline.hpp
-+asParNewGeneration.cpp                  markSweep.inline.hpp
- asParNewGeneration.cpp                  oop.pcgc.inline.hpp
- asParNewGeneration.cpp                  parNewGeneration.hpp
- asParNewGeneration.cpp                  referencePolicy.hpp
-@@ -40,7 +42,7 @@
- parCardTableModRefBS.cpp                java.hpp
- parCardTableModRefBS.cpp                mutexLocker.hpp
- parCardTableModRefBS.cpp                sharedHeap.hpp
--parCardTableModRefBS.cpp                space.hpp
-+parCardTableModRefBS.cpp                space.inline.hpp
- parCardTableModRefBS.cpp                universe.hpp
- parCardTableModRefBS.cpp                virtualspace.hpp
- 
---- openjdk/hotspot/src/share/vm/includeDB_features.orig	2009-01-13 10:10:44.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/includeDB_features	2009-01-13 10:11:17.000000000 +0000
-@@ -59,6 +59,8 @@
- 
- dump_<arch_model>.cpp                   assembler_<arch>.inline.hpp
- dump_<arch_model>.cpp                   compactingPermGenGen.hpp
-+dump_<arch_model>.cpp                   generation.inline.hpp
-+dump_<arch_model>.cpp                   space.inline.hpp
- 
- forte.cpp                               collectedHeap.inline.hpp
- forte.cpp                               debugInfoRec.hpp
---- openjdk/hotspot/src/share/vm/includeDB_core.orig	2009-03-11 13:14:45.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/includeDB_core	2009-03-11 13:15:59.000000000 +0000
-@@ -1311,6 +1311,7 @@
- cppInterpreter_<arch>.cpp               debug.hpp
- cppInterpreter_<arch>.cpp               deoptimization.hpp
- cppInterpreter_<arch>.cpp               frame.inline.hpp
-+cppInterpreter_<arch>.cpp               interfaceSupport.hpp
- cppInterpreter_<arch>.cpp               interpreterRuntime.hpp
- cppInterpreter_<arch>.cpp               interpreter.hpp
- cppInterpreter_<arch>.cpp               interpreterGenerator.hpp
--- a/patches/hotspot/original/icedtea-debuginfo.patch	Sun Feb 21 16:22:17 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-diff -urN openjdk.orig/hotspot/build/linux/makefiles/gcc.make openjdk/hotspot/build/linux/makefiles/gcc.make
---- openjdk.orig/hotspot/build/linux/makefiles/gcc.make	2007-10-12 18:11:59.000000000 -0400
-+++ openjdk/hotspot/build/linux/makefiles/gcc.make	2007-10-12 18:12:22.000000000 -0400
-@@ -63,6 +63,10 @@
- CFLAGS += -D_REENTRANT
- CFLAGS += -fcheck-new
- 
-+# Always generate full debuginfo on Linux.  It'll be in a separate
-+# debuginfo package when building RPMs.
-+CFLAGS += -g
-+
- ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
- ARCHFLAG/i486    = -m32 -march=i586
- ARCHFLAG/amd64   = -m64
-
--- a/patches/hotspot/original/icedtea-params-cast-size_t.patch	Sun Feb 21 16:22:17 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,255 +0,0 @@
---- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2009-03-11 21:54:11.000000000 +0100
-@@ -63,7 +63,7 @@
-   _last_used = current_live;
- 
-   // We have different alignment constraints than the rest of the heap.
--  const size_t alignment = MAX2(MinPermHeapExpansion,
-+  const size_t alignment = MAX2((size_t) MinPermHeapExpansion,
-                                 virtual_space()->alignment());
- 
-   // Compute the desired size:
---- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2009-03-11 21:54:11.000000000 +0100
-@@ -864,8 +864,8 @@
- void PSParallelCompact::initialize_dead_wood_limiter()
- {
-   const size_t max = 100;
--  _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
--  _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
-+  _dwl_mean = double(MIN2((size_t) ParallelOldDeadWoodLimiterMean, max)) / 100.0;
-+  _dwl_std_dev = double(MIN2((size_t) ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
-   _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
-   DEBUG_ONLY(_dwl_initialized = true;)
-   _dwl_adjustment = normal_distribution(1.0);
---- openjdk/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp	2009-03-11 21:54:11.000000000 +0100
-@@ -72,7 +72,7 @@
- }
- 
- size_t DirtyCardQueueSet::num_par_ids() {
--  return MAX2(ParallelGCThreads, (size_t)2);
-+  return MAX2((size_t)ParallelGCThreads, (size_t)2);
- }
- 
- 
---- openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	2009-03-11 21:54:11.000000000 +0100
-@@ -1061,7 +1061,7 @@
- int HeapRegionRemSet::num_par_rem_sets() {
-   // We always have at least two, so that a mutator thread can claim an
-   // id and add to a rem set.
--  return (int) MAX2(ParallelGCThreads, (size_t)2);
-+  return (int) MAX2((size_t)ParallelGCThreads, (size_t)2);
- }
- 
- HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa,
---- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.orig	2009-03-11 21:52:00.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2009-03-11 21:54:11.000000000 +0100
-@@ -412,7 +412,7 @@
-   _regionStack(),
-   // _finger set in set_non_marking_state
- 
--  _max_task_num(MAX2(ParallelGCThreads, (size_t)1)),
-+  _max_task_num(MAX2((size_t)ParallelGCThreads, (size_t)1)),
-   // _active_tasks set in set_non_marking_state
-   // _tasks set inside the constructor
-   _task_queues(new CMTaskQueueSet((int) _max_task_num)),
-@@ -463,7 +463,7 @@
-   SATBMarkQueueSet& satb_qs = JavaThread::satb_mark_queue_set();
-   satb_qs.set_buffer_size(G1SATBLogBufferSize);
- 
--  int size = (int) MAX2(ParallelGCThreads, (size_t)1);
-+  int size = (int) MAX2((size_t)ParallelGCThreads, (size_t)1);
-   _par_cleanup_thread_state = NEW_C_HEAP_ARRAY(ParCleanupThreadState*, size);
-   for (int i = 0 ; i < size; i++) {
-     _par_cleanup_thread_state[i] = new ParCleanupThreadState;
-@@ -521,7 +521,7 @@
-       _sleep_factor             = sleep_factor;
-       _marking_task_overhead    = marking_task_overhead;
-     } else {
--      _parallel_marking_threads = MAX2((ParallelGCThreads + 2) / 4, (size_t)1);
-+      _parallel_marking_threads = MAX2((size_t)((ParallelGCThreads + 2) / 4), (size_t)1);
-       _sleep_factor             = 0.0;
-       _marking_task_overhead    = 1.0;
-     }
-@@ -648,7 +648,7 @@
- }
- 
- ConcurrentMark::~ConcurrentMark() {
--  int size = (int) MAX2(ParallelGCThreads, (size_t)1);
-+  int size = (int) MAX2((size_t)ParallelGCThreads, (size_t)1);
-   for (int i = 0; i < size; i++) delete _par_cleanup_thread_state[i];
-   FREE_C_HEAP_ARRAY(ParCleanupThreadState*,
-                     _par_cleanup_thread_state);
-@@ -1746,7 +1746,7 @@
-   if (has_aborted()) return;
- 
-   int first = 0;
--  int last = (int)MAX2(ParallelGCThreads, (size_t)1);
-+  int last = (int)MAX2((size_t)ParallelGCThreads, (size_t)1);
-   for (int t = 0; t < last; t++) {
-     UncleanRegionList* list = &_par_cleanup_thread_state[t]->list;
-     assert(list->well_formed(), "Inv");
-@@ -3199,7 +3199,7 @@
-   // of things to do) or totally (at the very end).
-   size_t target_size;
-   if (partially)
--    target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);
-+    target_size = MIN2((size_t)_task_queue->max_elems()/3, (size_t)GCDrainStackTargetSize);
-   else
-     target_size = 0;
- 
---- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2009-03-11 21:54:11.000000000 +0100
-@@ -939,7 +939,7 @@
-   if (free_percentage < desired_free_percentage) {
-     size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
-     assert(desired_capacity >= capacity(), "invalid expansion size");
--    expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
-+    expand_bytes = MAX2((long unsigned int) (desired_capacity - capacity()), (long unsigned int) MinHeapDeltaBytes);
-   }
-   if (expand_bytes > 0) {
-     if (PrintGCDetails && Verbose) {
-@@ -6054,7 +6054,7 @@
-     HeapWord* curAddr = _markBitMap.startWord();
-     while (curAddr < _markBitMap.endWord()) {
-       size_t remaining  = pointer_delta(_markBitMap.endWord(), curAddr);
--      MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
-+      MemRegion chunk(curAddr, MIN2((size_t) CMSBitMapYieldQuantum, remaining));
-       _markBitMap.clear_large_range(chunk);
-       if (ConcurrentMarkSweepThread::should_yield() &&
-           !foregroundGCIsActive() &&
-@@ -6342,7 +6342,7 @@
-     return;
-   }
-   // Double capacity if possible
--  size_t new_capacity = MIN2(_capacity*2, CMSMarkStackSizeMax);
-+  size_t new_capacity = MIN2((size_t) (_capacity*2), (size_t) CMSMarkStackSizeMax);
-   // Do not give up existing stack until we have managed to
-   // get the double capacity that we desired.
-   ReservedSpace rs(ReservedSpace::allocation_align_size_up(
---- openjdk/hotspot/src/share/vm/runtime/arguments.cpp.orig	2009-03-11 21:45:27.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2009-03-11 21:54:11.000000000 +0100
-@@ -1051,7 +1051,7 @@
-   // for "short" pauses ~ 4M*ParallelGCThreads
-   if (FLAG_IS_DEFAULT(MaxNewSize)) {  // MaxNewSize not set at command-line
-     if (!FLAG_IS_DEFAULT(NewSize)) {   // NewSize explicitly set at command-line
--      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
-+      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t) NewSize, preferred_max_new_size));
-     } else {
-       FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
-     }
-@@ -1064,7 +1064,7 @@
-   // Old to Young gen size so as to shift the collection load
-   // to the old generation concurrent collector
-   if (FLAG_IS_DEFAULT(NewRatio)) {
--    FLAG_SET_ERGO(intx, NewRatio, MAX2(NewRatio, new_ratio));
-+    FLAG_SET_ERGO(intx, NewRatio, MAX2((intx) NewRatio, new_ratio));
- 
-     size_t min_new  = align_size_up(ScaleForWordSize(min_new_default), os::vm_page_size());
-     size_t prev_initial_size = initial_heap_size();
-@@ -1093,8 +1093,8 @@
-       // Unless explicitly requested otherwise, make young gen
-       // at least min_new, and at most preferred_max_new_size.
-       if (FLAG_IS_DEFAULT(NewSize)) {
--        FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new));
--        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize));
-+        FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t) NewSize, min_new));
-+        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t) NewSize));
-         if(PrintGCDetails && Verbose) {
-           // Too early to use gclog_or_tty
-           tty->print_cr("Ergo set NewSize: " SIZE_FORMAT, NewSize);
-@@ -1105,7 +1105,7 @@
-       // later NewRatio will decide how it grows; see above.
-       if (FLAG_IS_DEFAULT(OldSize)) {
-         if (max_heap > NewSize) {
--          FLAG_SET_ERGO(uintx, OldSize, MIN2(3*NewSize,  max_heap - NewSize));
-+          FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t) (3*NewSize),  max_heap - (size_t) NewSize));
-           if(PrintGCDetails && Verbose) {
-             // Too early to use gclog_or_tty
-             tty->print_cr("Ergo set OldSize: " SIZE_FORMAT, OldSize);
---- openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2009-03-11 21:54:11.000000000 +0100
-@@ -221,7 +221,7 @@
-   size_t init_sz;
- 
-   if (TLABSize > 0) {
--    init_sz = MIN2(TLABSize / HeapWordSize, max_size());
-+    init_sz = MIN2((size_t) (TLABSize / HeapWordSize), max_size());
-   } else if (global_stats() == NULL) {
-     // Startup issue - main thread initialized before heap initialized.
-     init_sz = min_size();
---- openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	2009-03-11 21:55:31.000000000 +0100
-@@ -281,7 +281,7 @@
-     // yield a size that is too small) and bound it by MaxNewSize above.
-     // Ergonomics plays here by previously calculating the desired
-     // NewSize and MaxNewSize.
--    max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize);
-+    max_new_size = MIN2(MAX2(max_new_size, (size_t)NewSize), (size_t)MaxNewSize);
-   }
-   assert(max_new_size > 0, "All paths should set max_new_size");
- 
-@@ -308,7 +308,7 @@
-       // generally small compared to the NewRatio calculation.
-       _min_gen0_size = NewSize;
-       desired_new_size = NewSize;
--      max_new_size = MAX2(max_new_size, NewSize);
-+      max_new_size = MAX2(max_new_size, (size_t) NewSize);
-     } else {
-       // For the case where NewSize is the default, use NewRatio
-       // to size the minimum and initial generation sizes.
-@@ -316,10 +316,10 @@
-       // NewRatio is overly large, the resulting sizes can be too
-       // small.
-       _min_gen0_size = MAX2(scale_by_NewRatio_aligned(min_heap_byte_size()),
--                          NewSize);
-+                          (size_t) NewSize);
-       desired_new_size =
-         MAX2(scale_by_NewRatio_aligned(initial_heap_byte_size()),
--             NewSize);
-+             (size_t) NewSize);
-     }
- 
-     assert(_min_gen0_size > 0, "Sanity check");
-@@ -374,14 +374,14 @@
-       // Adjust gen0 down to accomodate OldSize
-       *gen0_size_ptr = heap_size - min_gen0_size;
-       *gen0_size_ptr =
--        MAX2((uintx)align_size_down(*gen0_size_ptr, min_alignment()),
-+        MAX2((size_t)align_size_down(*gen0_size_ptr, min_alignment()),
-              min_alignment());
-       assert(*gen0_size_ptr > 0, "Min gen0 is too large");
-       result = true;
-     } else {
-       *gen1_size_ptr = heap_size - *gen0_size_ptr;
-       *gen1_size_ptr =
--        MAX2((uintx)align_size_down(*gen1_size_ptr, min_alignment()),
-+        MAX2((size_t)align_size_down(*gen1_size_ptr, min_alignment()),
-                        min_alignment());
-     }
-   }
-@@ -405,7 +405,7 @@
-   // for setting the gen1 maximum.
-   _max_gen1_size = max_heap_byte_size() - _max_gen0_size;
-   _max_gen1_size =
--    MAX2((uintx)align_size_down(_max_gen1_size, min_alignment()),
-+    MAX2((size_t)align_size_down(_max_gen1_size, min_alignment()),
-          min_alignment());
-   // If no explicit command line flag has been set for the
-   // gen1 size, use what is left for gen1.
-@@ -419,11 +419,11 @@
-       "gen0 has an unexpected minimum size");
-     set_min_gen1_size(min_heap_byte_size() - min_gen0_size());
-     set_min_gen1_size(
--      MAX2((uintx)align_size_down(_min_gen1_size, min_alignment()),
-+      MAX2((size_t)align_size_down(_min_gen1_size, min_alignment()),
-            min_alignment()));
-     set_initial_gen1_size(initial_heap_byte_size() - initial_gen0_size());
-     set_initial_gen1_size(
--      MAX2((uintx)align_size_down(_initial_gen1_size, min_alignment()),
-+      MAX2((size_t)align_size_down(_initial_gen1_size, min_alignment()),
-            min_alignment()));
- 
-   } else {
--- a/patches/hotspot/original/memory-limits.patch	Sun Feb 21 16:22:17 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp
---- openjdk.orig/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp      2008-05-23 22:30:44.000000000 +0100
-+++ openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp   2008-05-23 22:30:59.000000000 +0100
-@@ -98,7 +98,7 @@
-
- // Heap related flags
- define_pd_global(uintx, PermSize,    ScaleForWordSize(16*M));
--define_pd_global(uintx, MaxPermSize, ScaleForWordSize(64*M));
-+define_pd_global(uintx, MaxPermSize, ScaleForWordSize(128*M));
-
- // Ergonomics related flags
- define_pd_global(bool, NeverActAsServerClassMachine, false);
---- penjdk6/hotspot/src/share/vm/runtime/globals.hpp	2008-02-12 04:14:24.000000000 -0500
-+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	2008-02-14 16:34:00.000000000 -0500
-@@ -2606,7 +2606,7 @@
-           "an OS lock")                                                     \
-                                                                             \
-   /* gc parameters */                                                       \
--  product(uintx, MaxHeapSize, ScaleForWordSize(64*M),                       \
-+  product(uintx, MaxHeapSize, ScaleForWordSize(512*M),                       \
-           "Default maximum size for object heap (in bytes)")                \
-                                                                             \
-   product_pd(uintx, NewSize, 						    \
--- a/patches/icedtea-nss-6763530.patch	Sun Feb 21 16:22:17 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-diff -r 1f83d4e42eda src/share/classes/sun/security/pkcs11/P11ECKeyFactory.java
---- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/P11ECKeyFactory.java	Mon Aug 31 12:55:15 2009 +0900
-+++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11ECKeyFactory.java	Thu Sep 03 18:47:40 2009 +0100
-@@ -40,6 +40,8 @@
- import sun.security.pkcs11.wrapper.*;
- import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
- 
-+import sun.security.util.DerValue;
-+
- /**
-  * EC KeyFactory implemenation.
-  *
-@@ -201,7 +203,14 @@
- 
-     private PublicKey generatePublic(ECPoint point, ECParameterSpec params) throws PKCS11Exception {
-         byte[] encodedParams = ECParameters.encodeParameters(params);
--        byte[] encodedPoint = ECParameters.encodePoint(point, params.getCurve());
-+        DerValue pkECPoint = new DerValue(DerValue.tag_OctetString,
-+                                          ECParameters.encodePoint(point, params.getCurve()));
-+        byte[] encodedPoint = null;
-+        try {
-+          encodedPoint = pkECPoint.toByteArray();
-+        } catch (IOException e) {
-+          throw new IllegalArgumentException("Could not DER encode point", e);
-+        }
-         CK_ATTRIBUTE[] attributes = new CK_ATTRIBUTE[] {
-             new CK_ATTRIBUTE(CKA_CLASS, CKO_PUBLIC_KEY),
-             new CK_ATTRIBUTE(CKA_KEY_TYPE, CKK_EC),
-diff -r 1f83d4e42eda src/share/classes/sun/security/pkcs11/P11Key.java
---- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java	Mon Aug 31 12:55:15 2009 +0900
-+++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Key.java	Thu Sep 03 18:47:40 2009 +0100
-@@ -44,6 +44,8 @@
- import sun.security.pkcs11.wrapper.*;
- import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
- 
-+import sun.security.util.DerValue;
-+
- /**
-  * Key implementation classes.
-  *
-@@ -1014,10 +1016,13 @@
-             };
-             fetchAttributes(attributes);
-             try {
-+                DerValue wECPoint = new DerValue(attributes[0].getByteArray());
-+                if (wECPoint.getTag() != DerValue.tag_OctetString)
-+                    throw new IOException("Unexpected tag: " + wECPoint.getTag());
-                 params = P11ECKeyFactory.decodeParameters
-                             (attributes[1].getByteArray());
-                 w = P11ECKeyFactory.decodePoint
--                            (attributes[0].getByteArray(), params.getCurve());
-+                    (wECPoint.getDataBytes(), params.getCurve());
-             } catch (Exception e) {
-                 throw new RuntimeException("Could not parse key values", e);
-             }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-params-cast-size_t.patch	Thu Feb 25 18:48:18 2010 +0000
@@ -0,0 +1,252 @@
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2009-12-08 23:12:17.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2010-01-11 20:57:36.000000000 +0000
+@@ -941,7 +941,7 @@
+   if (free_percentage < desired_free_percentage) {
+     size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
+     assert(desired_capacity >= capacity(), "invalid expansion size");
+-    expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
++    expand_bytes = MAX2((long unsigned int) (desired_capacity - capacity()), (long unsigned int) MinHeapDeltaBytes);
+   }
+   if (expand_bytes > 0) {
+     if (PrintGCDetails && Verbose) {
+@@ -6095,7 +6095,7 @@
+     HeapWord* curAddr = _markBitMap.startWord();
+     while (curAddr < _markBitMap.endWord()) {
+       size_t remaining  = pointer_delta(_markBitMap.endWord(), curAddr);
+-      MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
++      MemRegion chunk(curAddr, MIN2((size_t) CMSBitMapYieldQuantum, remaining));
+       _markBitMap.clear_large_range(chunk);
+       if (ConcurrentMarkSweepThread::should_yield() &&
+           !foregroundGCIsActive() &&
+@@ -6383,7 +6383,7 @@
+     return;
+   }
+   // Double capacity if possible
+-  size_t new_capacity = MIN2(_capacity*2, CMSMarkStackSizeMax);
++  size_t new_capacity = MIN2((size_t) (_capacity*2), (size_t) CMSMarkStackSizeMax);
+   // Do not give up existing stack until we have managed to
+   // get the double capacity that we desired.
+   ReservedSpace rs(ReservedSpace::allocation_align_size_up(
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2010-01-11 20:48:22.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2010-01-11 20:57:36.000000000 +0000
+@@ -412,7 +412,7 @@
+   _regionStack(),
+   // _finger set in set_non_marking_state
+ 
+-  _max_task_num(MAX2(ParallelGCThreads, (size_t)1)),
++  _max_task_num(MAX2((size_t)ParallelGCThreads, (size_t)1)),
+   // _active_tasks set in set_non_marking_state
+   // _tasks set inside the constructor
+   _task_queues(new CMTaskQueueSet((int) _max_task_num)),
+@@ -463,7 +463,7 @@
+   SATBMarkQueueSet& satb_qs = JavaThread::satb_mark_queue_set();
+   satb_qs.set_buffer_size(G1SATBLogBufferSize);
+ 
+-  int size = (int) MAX2(ParallelGCThreads, (size_t)1);
++  int size = (int) MAX2((size_t)ParallelGCThreads, (size_t)1);
+   _par_cleanup_thread_state = NEW_C_HEAP_ARRAY(ParCleanupThreadState*, size);
+   for (int i = 0 ; i < size; i++) {
+     _par_cleanup_thread_state[i] = new ParCleanupThreadState;
+@@ -522,7 +522,7 @@
+       _sleep_factor             = sleep_factor;
+       _marking_task_overhead    = marking_task_overhead;
+     } else {
+-      _parallel_marking_threads = MAX2((ParallelGCThreads + 2) / 4, (size_t)1);
++      _parallel_marking_threads = MAX2((size_t)((ParallelGCThreads + 2) / 4), (size_t)1);
+       _sleep_factor             = 0.0;
+       _marking_task_overhead    = 1.0;
+     }
+@@ -649,7 +649,7 @@
+ }
+ 
+ ConcurrentMark::~ConcurrentMark() {
+-  int size = (int) MAX2(ParallelGCThreads, (size_t)1);
++  int size = (int) MAX2((size_t)ParallelGCThreads, (size_t)1);
+   for (int i = 0; i < size; i++) delete _par_cleanup_thread_state[i];
+   FREE_C_HEAP_ARRAY(ParCleanupThreadState*,
+                     _par_cleanup_thread_state);
+@@ -1708,7 +1708,7 @@
+   if (has_aborted()) return;
+ 
+   int first = 0;
+-  int last = (int)MAX2(ParallelGCThreads, (size_t)1);
++  int last = (int)MAX2((size_t)ParallelGCThreads, (size_t)1);
+   for (int t = 0; t < last; t++) {
+     UncleanRegionList* list = &_par_cleanup_thread_state[t]->list;
+     assert(list->well_formed(), "Inv");
+@@ -3202,7 +3202,7 @@
+   // of things to do) or totally (at the very end).
+   size_t target_size;
+   if (partially)
+-    target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);
++    target_size = MIN2((size_t)_task_queue->max_elems()/3, (size_t)GCDrainStackTargetSize);
+   else
+     target_size = 0;
+ 
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	2009-12-08 23:12:17.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	2010-01-11 20:57:36.000000000 +0000
+@@ -1058,7 +1058,7 @@
+ // This can be done by either mutator threads together with the
+ // concurrent refinement threads or GC threads.
+ int HeapRegionRemSet::num_par_rem_sets() {
+-  return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), ParallelGCThreads);
++  return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), (size_t)ParallelGCThreads);
+ }
+ 
+ HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa,
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2009-12-08 23:12:17.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2010-01-11 20:57:36.000000000 +0000
+@@ -863,8 +863,8 @@
+ void PSParallelCompact::initialize_dead_wood_limiter()
+ {
+   const size_t max = 100;
+-  _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
+-  _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
++  _dwl_mean = double(MIN2((size_t) ParallelOldDeadWoodLimiterMean, max)) / 100.0;
++  _dwl_std_dev = double(MIN2((size_t) ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
+   _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
+   DEBUG_ONLY(_dwl_initialized = true;)
+   _dwl_adjustment = normal_distribution(1.0);
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2009-12-08 23:12:17.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2010-01-11 20:57:36.000000000 +0000
+@@ -63,7 +63,7 @@
+   _last_used = current_live;
+ 
+   // We have different alignment constraints than the rest of the heap.
+-  const size_t alignment = MAX2(MinPermHeapExpansion,
++  const size_t alignment = MAX2((size_t) MinPermHeapExpansion,
+                                 virtual_space()->alignment());
+ 
+   // Compute the desired size:
+diff -Nru openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
+--- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp	2009-12-08 23:12:17.000000000 +0000
++++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	2010-01-11 20:57:36.000000000 +0000
+@@ -281,7 +281,7 @@
+     // yield a size that is too small) and bound it by MaxNewSize above.
+     // Ergonomics plays here by previously calculating the desired
+     // NewSize and MaxNewSize.
+-    max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize);
++    max_new_size = MIN2(MAX2(max_new_size, (size_t)NewSize), (size_t)MaxNewSize);
+   }
+   assert(max_new_size > 0, "All paths should set max_new_size");
+ 
+@@ -308,7 +308,7 @@
+       // generally small compared to the NewRatio calculation.
+       _min_gen0_size = NewSize;
+       desired_new_size = NewSize;
+-      max_new_size = MAX2(max_new_size, NewSize);
++      max_new_size = MAX2(max_new_size, (size_t) NewSize);
+     } else {
+       // For the case where NewSize is the default, use NewRatio
+       // to size the minimum and initial generation sizes.
+@@ -316,10 +316,10 @@
+       // NewRatio is overly large, the resulting sizes can be too
+       // small.
+       _min_gen0_size = MAX2(scale_by_NewRatio_aligned(min_heap_byte_size()),
+-                          NewSize);
++                          (size_t) NewSize);
+       desired_new_size =
+         MAX2(scale_by_NewRatio_aligned(initial_heap_byte_size()),
+-             NewSize);
++             (size_t) NewSize);
+     }
+ 
+     assert(_min_gen0_size > 0, "Sanity check");
+@@ -374,14 +374,14 @@
+       // Adjust gen0 down to accomodate OldSize
+       *gen0_size_ptr = heap_size - min_gen0_size;
+       *gen0_size_ptr =
+-        MAX2((uintx)align_size_down(*gen0_size_ptr, min_alignment()),
++        MAX2((size_t)align_size_down(*gen0_size_ptr, min_alignment()),
+              min_alignment());
+       assert(*gen0_size_ptr > 0, "Min gen0 is too large");
+       result = true;
+     } else {
+       *gen1_size_ptr = heap_size - *gen0_size_ptr;
+       *gen1_size_ptr =
+-        MAX2((uintx)align_size_down(*gen1_size_ptr, min_alignment()),
++        MAX2((size_t)align_size_down(*gen1_size_ptr, min_alignment()),
+                        min_alignment());
+     }
+   }
+@@ -405,7 +405,7 @@
+   // for setting the gen1 maximum.
+   _max_gen1_size = max_heap_byte_size() - _max_gen0_size;
+   _max_gen1_size =
+-    MAX2((uintx)align_size_down(_max_gen1_size, min_alignment()),
++    MAX2((size_t)align_size_down(_max_gen1_size, min_alignment()),
+          min_alignment());
+   // If no explicit command line flag has been set for the
+   // gen1 size, use what is left for gen1.
+@@ -419,11 +419,11 @@
+       "gen0 has an unexpected minimum size");
+     set_min_gen1_size(min_heap_byte_size() - min_gen0_size());
+     set_min_gen1_size(
+-      MAX2((uintx)align_size_down(_min_gen1_size, min_alignment()),
++      MAX2((size_t)align_size_down(_min_gen1_size, min_alignment()),
+            min_alignment()));
+     set_initial_gen1_size(initial_heap_byte_size() - initial_gen0_size());
+     set_initial_gen1_size(
+-      MAX2((uintx)align_size_down(_initial_gen1_size, min_alignment()),
++      MAX2((size_t)align_size_down(_initial_gen1_size, min_alignment()),
+            min_alignment()));
+ 
+   } else {
+diff -Nru openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
+--- openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2009-12-08 23:12:17.000000000 +0000
++++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2010-01-11 20:57:36.000000000 +0000
+@@ -221,7 +221,7 @@
+   size_t init_sz;
+ 
+   if (TLABSize > 0) {
+-    init_sz = MIN2(TLABSize / HeapWordSize, max_size());
++    init_sz = MIN2((size_t) (TLABSize / HeapWordSize), max_size());
+   } else if (global_stats() == NULL) {
+     // Startup issue - main thread initialized before heap initialized.
+     init_sz = min_size();
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2010-01-11 20:48:21.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2010-01-11 20:59:44.000000000 +0000
+@@ -1071,7 +1071,7 @@
+     // NewSize was set on the command line and it is larger than
+     // preferred_max_new_size.
+     if (!FLAG_IS_DEFAULT(NewSize)) {   // NewSize explicitly set at command-line
+-      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
++      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t) NewSize, preferred_max_new_size));
+     } else {
+       FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
+     }
+@@ -1090,7 +1090,7 @@
+     // there was no obvious reason.  Also limit to the case where
+     // MaxNewSize has not been set.
+ 
+-    FLAG_SET_ERGO(intx, NewRatio, MAX2(NewRatio, new_ratio));
++    FLAG_SET_ERGO(intx, NewRatio, MAX2((intx) NewRatio, new_ratio));
+ 
+     // Code along this path potentially sets NewSize and OldSize
+ 
+@@ -1132,8 +1132,8 @@
+       // Unless explicitly requested otherwise, make young gen
+       // at least min_new, and at most preferred_max_new_size.
+       if (FLAG_IS_DEFAULT(NewSize)) {
+-        FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new));
+-        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize));
++	FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t) NewSize, min_new));
++        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t) NewSize));
+         if (PrintGCDetails && Verbose) {
+           // Too early to use gclog_or_tty
+           tty->print_cr("Ergo set NewSize: " SIZE_FORMAT, NewSize);
+@@ -1144,7 +1144,7 @@
+       // later NewRatio will decide how it grows; see above.
+       if (FLAG_IS_DEFAULT(OldSize)) {
+         if (max_heap > NewSize) {
+-          FLAG_SET_ERGO(uintx, OldSize, MIN2(3*NewSize, max_heap - NewSize));
++	  FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t) 3*NewSize, max_heap - (size_t) NewSize));
+           if (PrintGCDetails && Verbose) {
+             // Too early to use gclog_or_tty
+             tty->print_cr("Ergo set OldSize: " SIZE_FORMAT, OldSize);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/memory-limits.patch	Thu Feb 25 18:48:18 2010 +0000
@@ -0,0 +1,24 @@
+diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp
+--- openjdk.orig/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp	2009-12-08 23:12:17.000000000 +0000
++++ openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp	2010-01-11 20:44:32.000000000 +0000
+@@ -95,7 +95,7 @@
+ 
+ // Heap related flags
+ define_pd_global(uintx,PermSize,    ScaleForWordSize(16*M));
+-define_pd_global(uintx,MaxPermSize, ScaleForWordSize(64*M));
++define_pd_global(uintx,MaxPermSize, ScaleForWordSize(128*M));
+ 
+ // Ergonomics related flags
+ define_pd_global(bool, NeverActAsServerClassMachine, false);
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp openjdk/hotspot/src/share/vm/runtime/globals.hpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp	2009-12-08 23:12:17.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	2010-01-11 20:45:17.000000000 +0000
+@@ -2809,7 +2809,7 @@
+   product(uintx, InitialHeapSize, 0,                                        \
+           "Initial heap size (in bytes); zero means OldSize + NewSize")     \
+                                                                             \
+-  product(uintx, MaxHeapSize, ScaleForWordSize(96*M),                       \
++  product(uintx, MaxHeapSize, ScaleForWordSize(512*M),                      \
+           "Maximum heap size (in bytes)")                                   \
+                                                                             \
+   product(uintx, OldSize, ScaleForWordSize(4*M),                            \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/shark.patch	Thu Feb 25 18:48:18 2010 +0000
@@ -0,0 +1,9 @@
+--- openjdk.orig/hotspot/src/cpu//zero/vm/shark_globals_zero.hpp	2009-09-10 15:36:58.658607552 +0100
++++ openjdk/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp	2010-01-13 14:57:16.000000000 +0000
+@@ -59,5 +59,5 @@
+ define_pd_global(uintx, PermSize,                     12*M );
+ define_pd_global(uintx, MaxPermSize,                  64*M );
+ define_pd_global(bool,  NeverActAsServerClassMachine, true );
+-define_pd_global(uintx, DefaultMaxRAM,                1*G  );
++define_pd_global(uint64_t,MaxRAM,                    1ULL*G);
+ define_pd_global(bool,  CICompileOSR,                 true );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/zero.patch	Thu Feb 25 18:48:18 2010 +0000
@@ -0,0 +1,107 @@
+diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp
+--- openjdk.orig/hotspot/src/cpu/zero/vm/assembler_zero.cpp	Mon Oct 26 23:26:33 2009 +0000
++++ openjdk/hotspot/src/cpu/zero/vm/assembler_zero.cpp	Tue Oct 27 15:06:00 2009 +0000
+@@ -54,6 +54,12 @@
+   sync();
+ }
+ 
++RegisterOrConstant MacroAssembler::delayed_value_impl(intptr_t* delayed_value_addr,
++						      Register tmpl, int offset) 
++{
++  Unimplemented();
++}
++
+ void MacroAssembler::store_oop(jobject obj) {
+   code_section()->relocate(pc(), oop_Relocation::spec_for_immediate());
+   emit_address((address) obj);
+diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp
+--- openjdk.orig/hotspot/src/cpu/zero/vm/assembler_zero.hpp	Mon Oct 26 23:26:33 2009 +0000
++++ openjdk/hotspot/src/cpu/zero/vm/assembler_zero.hpp	Tue Oct 27 15:06:00 2009 +0000
+@@ -47,7 +47,8 @@
+   void align(int modulus);
+   void bang_stack_with_offset(int offset);
+   bool needs_explicit_null_check(intptr_t offset);
+-
++  RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr,
++					Register tmp, int offset);
+  public:
+   void advance(int bytes);
+   void store_oop(jobject obj);
+diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
+--- openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Mon Oct 26 23:26:33 2009 +0000
++++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Tue Oct 27 15:06:00 2009 +0000
+@@ -759,6 +759,10 @@
+     entry_point = ((InterpreterGenerator*) this)->generate_abstract_entry();
+     break;
+ 
++  case Interpreter::method_handle:
++    entry_point = ((InterpreterGenerator*)this)->generate_method_handle_entry();
++    break;
++
+   case Interpreter::java_lang_math_sin:
+   case Interpreter::java_lang_math_cos:
+   case Interpreter::java_lang_math_tan:
+diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/frame_zero.cpp
+--- openjdk.orig/hotspot/src/cpu/zero/vm/frame_zero.cpp	Mon Oct 26 23:26:33 2009 +0000
++++ openjdk/hotspot/src/cpu/zero/vm/frame_zero.cpp	Tue Oct 27 15:06:00 2009 +0000
+@@ -166,7 +166,7 @@
+   return type;
+ }
+ 
+-int frame::frame_size() const {
++int frame::frame_size(RegisterMap* map) const {
+ #ifdef PRODUCT
+   ShouldNotCallThis();
+ #else
+diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp
+--- openjdk.orig/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp	Mon Oct 26 23:26:33 2009 +0000
++++ openjdk/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp	Tue Oct 27 15:06:00 2009 +0000
+@@ -28,4 +28,7 @@
+ class InterpreterMacroAssembler : public MacroAssembler {
+  public:
+   InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code) {}
++  RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr, Register tmp, int offset) {
++    Unimplemented();
++  }
+ };
+diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp
+--- openjdk.orig/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp	Mon Oct 26 23:26:33 2009 +0000
++++ openjdk/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp	Tue Oct 27 15:06:00 2009 +0000
+@@ -34,3 +34,4 @@
+   address generate_math_entry(AbstractInterpreter::MethodKind kind);
+   address generate_empty_entry();
+   address generate_accessor_entry();
++  address generate_method_handle_entry();
+diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp
+--- openjdk.orig/hotspot/src/cpu/zero/vm/interpreter_zero.cpp	Mon Oct 26 23:26:33 2009 +0000
++++ openjdk/hotspot/src/cpu/zero/vm/interpreter_zero.cpp	Tue Oct 27 15:06:00 2009 +0000
+@@ -43,6 +43,11 @@
+   return ShouldNotCallThisEntry();
+ }
+ 
++address InterpreterGenerator::generate_method_handle_entry()
++{
++  return ShouldNotCallThisEntry();
++}
++
+ int AbstractInterpreter::size_activation(methodOop method,
+                                          int tempcount,
+                                          int popframe_extra_args,
+diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/register_zero.hpp
+--- openjdk.orig/hotspot/src/cpu/zero/vm/register_zero.hpp	Mon Oct 26 23:26:33 2009 +0000
++++ openjdk/hotspot/src/cpu/zero/vm/register_zero.hpp	Tue Oct 27 15:06:00 2009 +0000
+@@ -106,3 +106,5 @@
+   static const int max_gpr;
+   static const int max_fpr;
+ };
++
++CONSTANT_REGISTER_DECLARATION(Register, noreg, (-1));
+diff -r 7d2ae1d67c95 ports/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp
+--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp	Mon Oct 26 23:26:33 2009 +0000
++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp	Tue Oct 27 15:06:00 2009 +0000
+@@ -41,3 +41,5 @@
+ define_pd_global(uintx, JVMInvokeMethodSlack,    8192);
+ 
+ define_pd_global(bool,  UseVectoredExceptions,   false);
++// Only used on 64 bit platforms
++define_pd_global(uintx, HeapBaseMinAddress,      2*G);