diff --git a/java-1.7.0-openjdk-bitmap.patch b/java-1.7.0-openjdk-bitmap.patch deleted file mode 100644 index 3f7de26..0000000 --- a/java-1.7.0-openjdk-bitmap.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -up openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp.s390 openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp ---- openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp.s390 2012-02-10 08:30:46.378435291 -0500 -+++ openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp 2012-02-10 08:47:27.478427892 -0500 -@@ -52,16 +52,16 @@ inline void BitMap::clear_bit(idx_t bit) - - inline bool BitMap::par_set_bit(idx_t bit) { - verify_index(bit); -- volatile idx_t* const addr = word_addr(bit); -- const idx_t mask = bit_mask(bit); -- idx_t old_val = *addr; -+ volatile bm_word_t* const addr = word_addr(bit); -+ const bm_word_t mask = bit_mask(bit); -+ bm_word_t old_val = *addr; - - do { -- const idx_t new_val = old_val | mask; -+ const bm_word_t new_val = old_val | mask; - if (new_val == old_val) { - return false; // Someone else beat us to it. - } -- const idx_t cur_val = (idx_t) Atomic::cmpxchg_ptr((void*) new_val, -+ const bm_word_t cur_val = (bm_word_t) Atomic::cmpxchg_ptr((void*) new_val, - (volatile void*) addr, - (void*) old_val); - if (cur_val == old_val) { -@@ -73,16 +73,16 @@ inline bool BitMap::par_set_bit(idx_t bi - - inline bool BitMap::par_clear_bit(idx_t bit) { - verify_index(bit); -- volatile idx_t* const addr = word_addr(bit); -- const idx_t mask = ~bit_mask(bit); -- idx_t old_val = *addr; -+ volatile bm_word_t* const addr = word_addr(bit); -+ const bm_word_t mask = ~bit_mask(bit); -+ bm_word_t old_val = *addr; - - do { -- const idx_t new_val = old_val & mask; -+ const bm_word_t new_val = old_val & mask; - if (new_val == old_val) { - return false; // Someone else beat us to it. - } -- const idx_t cur_val = (idx_t) Atomic::cmpxchg_ptr((void*) new_val, -+ const bm_word_t cur_val = (bm_word_t) Atomic::cmpxchg_ptr((void*) new_val, - (volatile void*) addr, - (void*) old_val); - if (cur_val == old_val) { diff --git a/java-1.7.0-openjdk-size_t.patch b/java-1.7.0-openjdk-size_t.patch deleted file mode 100644 index f9bfc20..0000000 --- a/java-1.7.0-openjdk-size_t.patch +++ /dev/null @@ -1,239 +0,0 @@ -diff -up openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp.sav openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp ---- openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp.sav 2012-02-14 16:11:12.000000000 -0500 -+++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp 2012-03-09 14:48:08.223867826 -0500 -@@ -572,15 +572,15 @@ void MethodLiveness::print_times() { - - - MethodLiveness::BasicBlock::BasicBlock(MethodLiveness *analyzer, int start, int limit) : -- _gen((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), -+ _gen((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), - analyzer->bit_map_size_bits()), -- _kill((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), -+ _kill((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), - analyzer->bit_map_size_bits()), -- _entry((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), -+ _entry((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), - analyzer->bit_map_size_bits()), -- _normal_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), -+ _normal_exit((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), - analyzer->bit_map_size_bits()), -- _exception_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), -+ _exception_exit((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), - analyzer->bit_map_size_bits()), - _last_bci(-1) { - _analyzer = analyzer; -@@ -998,7 +998,7 @@ bool MethodLiveness::BasicBlock::merge_e - } - - MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* method, int bci) { -- MethodLivenessResult answer(NEW_RESOURCE_ARRAY(size_t, _analyzer->bit_map_size_words()), -+ MethodLivenessResult answer(NEW_RESOURCE_ARRAY(BitMap::bm_word_t, _analyzer->bit_map_size_words()), - _analyzer->bit_map_size_bits()); - answer.set_is_valid(); - -diff -up openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp.sav openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp.sav 2012-02-14 16:11:12.000000000 -0500 -+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2012-03-09 14:48:08.223867826 -0500 -@@ -2656,7 +2656,7 @@ void CFLS_LAB::get_from_global_pool(size - if (ResizeOldPLAB && CMSOldPLABResizeQuicker) { - size_t multiple = _num_blocks[word_sz]/(CMSOldPLABToleranceFactor*CMSOldPLABNumRefills*n_blks); - n_blks += CMSOldPLABReactivityFactor*multiple*n_blks; -- n_blks = MIN2(n_blks, CMSOldPLABMax); -+ n_blks = MIN2(n_blks, (size_t)CMSOldPLABMax); - } - assert(n_blks > 0, "Error"); - _cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl); -diff -up openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.sav openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.sav 2012-02-14 16:11:12.000000000 -0500 -+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2012-03-09 16:30:30.426921691 -0500 -@@ -481,7 +481,7 @@ ConcurrentMark::ConcurrentMark(ReservedS - _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)), -@@ -586,7 +586,7 @@ ConcurrentMark::ConcurrentMark(ReservedS - _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; - } -@@ -1116,7 +1116,7 @@ void ConcurrentMark::markFromRoots() { - - _restart_for_overflow = false; - -- size_t active_workers = MAX2((size_t) 1, parallel_marking_threads()); -+ size_t active_workers = MAX2((size_t) 1, (size_t)parallel_marking_threads()); - force_overflow_conc()->init(); - set_phase(active_workers, true /* concurrent */); - -@@ -3689,7 +3689,7 @@ void CMTask::drain_local_queue(bool part - // 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; - } -@@ -4604,7 +4604,7 @@ size_t G1PrintRegionLivenessInfoClosure: - // The > 0 check is to deal with the prev and next live bytes which - // could be 0. - if (*hum_bytes > 0) { -- bytes = MIN2((size_t) HeapRegion::GrainBytes, *hum_bytes); -+ bytes = MIN2((size_t) HeapRegion::GrainBytes, (size_t)*hum_bytes); - *hum_bytes -= bytes; - } - return bytes; -diff -up openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.sav openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.sav 2012-02-14 16:11:12.000000000 -0500 -+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2012-03-09 14:48:08.226867784 -0500 -@@ -1615,7 +1615,7 @@ HeapWord* G1CollectedHeap::expand_and_al - - verify_region_sets_optional(); - -- size_t expand_bytes = MAX2(word_size * HeapWordSize, MinHeapDeltaBytes); -+ size_t expand_bytes = MAX2(word_size * HeapWordSize, (size_t)MinHeapDeltaBytes); - ergo_verbose1(ErgoHeapSizing, - "attempt heap expansion", - ergo_format_reason("allocation request failed") -diff -up openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.sav openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.sav 2012-02-14 16:11:12.000000000 -0500 -+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp 2012-03-09 14:48:08.226867784 -0500 -@@ -1083,7 +1083,7 @@ OtherRegionsTable::do_cleanup_work(HRRSC - // 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 -up openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp.sav openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp.sav 2012-02-14 16:11:12.000000000 -0500 -+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp 2012-03-09 14:48:08.226867784 -0500 -@@ -62,7 +62,7 @@ ParMarkBitMap::initialize(MemRegion cove - if (_virtual_space != NULL && _virtual_space->expand_by(bytes)) { - _region_start = covered_region.start(); - _region_size = covered_region.word_size(); -- idx_t* map = (idx_t*)_virtual_space->reserved_low_addr(); -+ BitMap::bm_word_t* map = (BitMap::bm_word_t*)_virtual_space->reserved_low_addr(); - _beg_bits.set_map(map); - _beg_bits.set_size(bits / 2); - _end_bits.set_map(map + words / 2); -diff -up openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.sav openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.sav 2012-02-14 16:11:12.000000000 -0500 -+++ openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2012-03-09 14:48:08.227867766 -0500 -@@ -188,7 +188,7 @@ bool ParScanThreadState::take_from_overf - const size_t num_overflow_elems = of_stack->size(); - const size_t space_available = queue->max_elems() - queue->size(); - const size_t num_take_elems = MIN3(space_available / 4, -- ParGCDesiredObjsFromOverflowList, -+ (size_t)ParGCDesiredObjsFromOverflowList, - num_overflow_elems); - // Transfer the most recent num_take_elems from the overflow - // stack to our work queue. -diff -up openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp.sav openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp ---- openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp.sav 2012-02-14 16:11:12.000000000 -0500 -+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp 2012-03-09 14:48:08.227867766 -0500 -@@ -354,7 +354,7 @@ void GenCollectorPolicy::initialize_size - // 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. -@@ -362,10 +362,10 @@ void GenCollectorPolicy::initialize_size - // 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"); -@@ -420,14 +420,14 @@ bool TwoGenerationCollectorPolicy::adjus - // 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()); - } - } -@@ -451,7 +451,7 @@ void TwoGenerationCollectorPolicy::initi - // 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. -@@ -465,11 +465,11 @@ void TwoGenerationCollectorPolicy::initi - "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 -up openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp.sav openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp ---- openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp.sav 2012-02-14 16:11:12.000000000 -0500 -+++ openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp 2012-03-09 14:48:08.227867766 -0500 -@@ -46,7 +46,7 @@ void objArrayKlass::objarray_follow_cont - const size_t beg_index = size_t(index); - assert(beg_index < len || len == 0, "index too large"); - -- const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride); -+ const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride); - const size_t end_index = beg_index + stride; - T* const base = (T*)a->base(); - T* const beg = base + beg_index; -@@ -80,7 +80,7 @@ void objArrayKlass::objarray_follow_cont - const size_t beg_index = size_t(index); - assert(beg_index < len || len == 0, "index too large"); - -- const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride); -+ const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride); - const size_t end_index = beg_index + stride; - T* const base = (T*)a->base(); - T* const beg = base + beg_index; -diff -up openjdk/hotspot/src/share/vm/runtime/arguments.cpp.sav openjdk/hotspot/src/share/vm/runtime/arguments.cpp ---- openjdk/hotspot/src/share/vm/runtime/arguments.cpp.sav 2012-02-14 16:11:12.000000000 -0500 -+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2012-03-09 14:48:08.228867748 -0500 -@@ -1179,7 +1179,7 @@ void Arguments::set_cms_and_parnew_gc_fl - // so it's NewRatio x of NewSize. - if (FLAG_IS_DEFAULT(OldSize)) { - if (max_heap > NewSize) { -- FLAG_SET_ERGO(uintx, OldSize, MIN2(NewRatio*NewSize, max_heap - NewSize)); -+ FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t)(NewRatio*NewSize), max_heap - NewSize)); - if (PrintGCDetails && Verbose) { - // Too early to use gclog_or_tty - tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize); diff --git a/java-1.7.0-openjdk.spec b/java-1.7.0-openjdk.spec index d92460b..31346e5 100644 --- a/java-1.7.0-openjdk.spec +++ b/java-1.7.0-openjdk.spec @@ -156,7 +156,7 @@ Name: java-%{javaver}-%{origin} Version: %{javaver}.60 -Release: %{icedtea_version}.1%{?dist} +Release: %{icedtea_version}.2%{?dist} # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons, # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -248,8 +248,8 @@ Patch6: %{name}-debuginfo.patch Patch100: rhino.patch # Type fixing for s390 -Patch101: %{name}-bitmap.patch -Patch102: %{name}-size_t.patch +Patch101: zero-s8024914.patch +Patch102: zero-size_t.patch # Patch for PPC/PPC64 Patch104: %{name}-ppc-zero-jdk.patch @@ -257,6 +257,11 @@ Patch105: %{name}-ppc-zero-hotspot.patch Patch106: %{name}-freetype-check-fix.patch +# Zero fixes +Patch110: zero-entry_frame_call_wrapper.patch +Patch111: zero-zero_build.patch +Patch112: zero-gcdrainstacktargetsize.patch + # allow to create hs_pid.log in tmp (in 700 permissions) if working directory is unwritable Patch107: abrt_friendly_hs_log_jdk7.patch @@ -497,10 +502,11 @@ tar xzf %{SOURCE9} %endif # Type fixes for s390 -%ifarch s390 s390x %patch101 %patch102 -%endif +%patch110 +%patch111 +%patch112 %patch106 %patch107 @@ -581,6 +587,9 @@ export ALT_BOOTDIR="$JDK_TO_BUILD_WITH" oldumask=`umask` # Set generic profile +%ifnarch %{jit_arches} +export ZERO_BUILD=true +%endif source jdk/make/jdk_generic_profile.sh # Restore old umask @@ -1150,6 +1159,9 @@ exit 0 %doc %{buildoutputdir}/j2sdk-image/jre/LICENSE %changelog +* Thu Sep 19 2013 Dan HorĂ¡k - 1.7.0.40-2.4.2.2.f18 +- fix build on zero arches (Andrew Hughes - 1.7.0.40-2.4.2.1.f18 - buildver replaced by updatever - buildver reset to 60 diff --git a/zero-entry_frame_call_wrapper.patch b/zero-entry_frame_call_wrapper.patch new file mode 100644 index 0000000..196b913 --- /dev/null +++ b/zero-entry_frame_call_wrapper.patch @@ -0,0 +1,34 @@ +# HG changeset patch +# User andrew +# Date 1378870967 -3600 +# Wed Sep 11 04:42:47 2013 +0100 +# Node ID 09f439dfd7b9d6e022f7af71c328b5b4b6a36c23 +# Parent 24b23eb187fcfb801eb3d479b30e3321f9f5dfd6 +Fix Zero following changes to entry_frame_call_wrapper in 8016131 + +diff --git a/src/cpu/zero/vm/entryFrame_zero.hpp b/src/cpu/zero/vm/entryFrame_zero.hpp +--- openjdk/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp ++++ openjdk/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp +@@ -58,8 +58,8 @@ + JavaCallWrapper* call_wrapper, + TRAPS); + public: +- JavaCallWrapper *call_wrapper() const { +- return (JavaCallWrapper *) value_of_word(call_wrapper_off); ++ JavaCallWrapper **call_wrapper() const { ++ return (JavaCallWrapper **) addr_of_word(call_wrapper_off); + } + + public: +diff --git a/src/cpu/zero/vm/frame_zero.inline.hpp b/src/cpu/zero/vm/frame_zero.inline.hpp +--- openjdk/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp ++++ openjdk/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp +@@ -132,7 +132,7 @@ + return fp(); + } + +-inline JavaCallWrapper* frame::entry_frame_call_wrapper() const { ++inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const { + return zero_entryframe()->call_wrapper(); + } + diff --git a/zero-gcdrainstacktargetsize.patch b/zero-gcdrainstacktargetsize.patch new file mode 100644 index 0000000..a8b4ef7 --- /dev/null +++ b/zero-gcdrainstacktargetsize.patch @@ -0,0 +1,20 @@ +# HG changeset patch +# User andrew +# Date 1379536490 -3600 +# Wed Sep 18 21:34:50 2013 +0100 +# Node ID af221c82682c974e06cc78b24808262d9ffc5af2 +# Parent 4fc9d4d964adf1f5316d81d1db1813ffd9f2286b +Cast should use same type as GCDrainStackTargetSize (uintx). + +diff --git a/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/src/share/vm/gc_implementation/g1/concurrentMark.cpp +--- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +@@ -3632,7 +3632,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((uintx)_task_queue->max_elems()/3, GCDrainStackTargetSize); + } else { + target_size = 0; + } diff --git a/zero-s8024914.patch b/zero-s8024914.patch new file mode 100644 index 0000000..d1c8d80 --- /dev/null +++ b/zero-s8024914.patch @@ -0,0 +1,58 @@ +# HG changeset patch +# User tschatzl +# Date 1379412251 -7200 +# Tue Sep 17 12:04:11 2013 +0200 +# Node ID c39d06e6c10d9b6ae8feab2eb872f0be91b08d4f +# Parent af221c82682c974e06cc78b24808262d9ffc5af2 +8024914: Swapped usage of idx_t and bm_word_t types in bitMap.inline.hpp +Summary: Incorrect usage of idx_t where bm_word_t is appropriate. +Reviewed-by: tschatzl, brutisso +Contributed-by: Dan Horak + +diff --git a/src/share/vm/utilities/bitMap.inline.hpp b/src/share/vm/utilities/bitMap.inline.hpp +--- openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp ++++ openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp +@@ -52,16 +52,16 @@ + + inline bool BitMap::par_set_bit(idx_t bit) { + verify_index(bit); +- volatile idx_t* const addr = word_addr(bit); +- const idx_t mask = bit_mask(bit); +- idx_t old_val = *addr; ++ volatile bm_word_t* const addr = word_addr(bit); ++ const bm_word_t mask = bit_mask(bit); ++ bm_word_t old_val = *addr; + + do { +- const idx_t new_val = old_val | mask; ++ const bm_word_t new_val = old_val | mask; + if (new_val == old_val) { + return false; // Someone else beat us to it. + } +- const idx_t cur_val = (idx_t) Atomic::cmpxchg_ptr((void*) new_val, ++ const bm_word_t cur_val = (bm_word_t) Atomic::cmpxchg_ptr((void*) new_val, + (volatile void*) addr, + (void*) old_val); + if (cur_val == old_val) { +@@ -73,16 +73,16 @@ + + inline bool BitMap::par_clear_bit(idx_t bit) { + verify_index(bit); +- volatile idx_t* const addr = word_addr(bit); +- const idx_t mask = ~bit_mask(bit); +- idx_t old_val = *addr; ++ volatile bm_word_t* const addr = word_addr(bit); ++ const bm_word_t mask = ~bit_mask(bit); ++ bm_word_t old_val = *addr; + + do { +- const idx_t new_val = old_val & mask; ++ const bm_word_t new_val = old_val & mask; + if (new_val == old_val) { + return false; // Someone else beat us to it. + } +- const idx_t cur_val = (idx_t) Atomic::cmpxchg_ptr((void*) new_val, ++ const bm_word_t cur_val = (bm_word_t) Atomic::cmpxchg_ptr((void*) new_val, + (volatile void*) addr, + (void*) old_val); + if (cur_val == old_val) { diff --git a/zero-size_t.patch b/zero-size_t.patch new file mode 100644 index 0000000..f898233 --- /dev/null +++ b/zero-size_t.patch @@ -0,0 +1,191 @@ +diff --git a/src/share/vm/compiler/methodLiveness.cpp b/src/share/vm/compiler/methodLiveness.cpp +--- openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp ++++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp +@@ -572,15 +572,15 @@ + + + MethodLiveness::BasicBlock::BasicBlock(MethodLiveness *analyzer, int start, int limit) : +- _gen((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _gen((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _kill((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _kill((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _entry((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _entry((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _normal_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _normal_exit((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _exception_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _exception_exit((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), + _last_bci(-1) { + _analyzer = analyzer; +@@ -998,7 +998,7 @@ + } + + MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* method, int bci) { +- MethodLivenessResult answer(NEW_RESOURCE_ARRAY(size_t, _analyzer->bit_map_size_words()), ++ MethodLivenessResult answer(NEW_RESOURCE_ARRAY(BitMap::bm_word_t, _analyzer->bit_map_size_words()), + _analyzer->bit_map_size_bits()); + answer.set_is_valid(); + +diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp +--- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp ++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp +@@ -2678,7 +2678,7 @@ + if (ResizeOldPLAB && CMSOldPLABResizeQuicker) { + size_t multiple = _num_blocks[word_sz]/(CMSOldPLABToleranceFactor*CMSOldPLABNumRefills*n_blks); + n_blks += CMSOldPLABReactivityFactor*multiple*n_blks; +- n_blks = MIN2(n_blks, CMSOldPLABMax); ++ n_blks = MIN2(n_blks, (size_t)CMSOldPLABMax); + } + assert(n_blks > 0, "Error"); + _cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl); +diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +--- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +@@ -1735,7 +1735,7 @@ + + verify_region_sets_optional(); + +- size_t expand_bytes = MAX2(word_size * HeapWordSize, MinHeapDeltaBytes); ++ size_t expand_bytes = MAX2(word_size * HeapWordSize, (size_t)MinHeapDeltaBytes); + ergo_verbose1(ErgoHeapSizing, + "attempt heap expansion", + ergo_format_reason("allocation request failed") +diff --git a/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp b/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp +--- openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp +@@ -840,7 +840,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 --git a/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp b/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp +--- openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp ++++ openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp +@@ -192,7 +192,7 @@ + const size_t num_overflow_elems = of_stack->size(); + const size_t space_available = queue->max_elems() - queue->size(); + const size_t num_take_elems = MIN3(space_available / 4, +- ParGCDesiredObjsFromOverflowList, ++ (size_t)ParGCDesiredObjsFromOverflowList, + num_overflow_elems); + // Transfer the most recent num_take_elems from the overflow + // stack to our work queue. +diff --git a/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp b/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp +--- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp +@@ -69,7 +69,7 @@ + if (_virtual_space != NULL && _virtual_space->expand_by(_reserved_byte_size)) { + _region_start = covered_region.start(); + _region_size = covered_region.word_size(); +- idx_t* map = (idx_t*)_virtual_space->reserved_low_addr(); ++ BitMap::bm_word_t* map = (BitMap::bm_word_t*)_virtual_space->reserved_low_addr(); + _beg_bits.set_map(map); + _beg_bits.set_size(bits / 2); + _end_bits.set_map(map + words / 2); +diff --git a/src/share/vm/memory/collectorPolicy.cpp b/src/share/vm/memory/collectorPolicy.cpp +--- openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp ++++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp +@@ -361,7 +361,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. +@@ -369,10 +369,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"); +@@ -427,14 +427,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()); + } + } +@@ -458,7 +458,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. +@@ -472,11 +472,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 --git a/src/share/vm/oops/objArrayKlass.inline.hpp b/src/share/vm/oops/objArrayKlass.inline.hpp +--- openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp ++++ openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp +@@ -46,7 +46,7 @@ + const size_t beg_index = size_t(index); + assert(beg_index < len || len == 0, "index too large"); + +- const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride); ++ const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride); + const size_t end_index = beg_index + stride; + T* const base = (T*)a->base(); + T* const beg = base + beg_index; +@@ -80,7 +80,7 @@ + const size_t beg_index = size_t(index); + assert(beg_index < len || len == 0, "index too large"); + +- const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride); ++ const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride); + const size_t end_index = beg_index + stride; + T* const base = (T*)a->base(); + T* const beg = base + beg_index; +diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp +--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp ++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp +@@ -1240,7 +1240,7 @@ + // so it's NewRatio x of NewSize. + if (FLAG_IS_DEFAULT(OldSize)) { + if (max_heap > NewSize) { +- FLAG_SET_ERGO(uintx, OldSize, MIN2(NewRatio*NewSize, max_heap - NewSize)); ++ FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t)(NewRatio*NewSize), max_heap - NewSize)); + if (PrintGCDetails && Verbose) { + // Too early to use gclog_or_tty + tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize); diff --git a/zero-zero_build.patch b/zero-zero_build.patch new file mode 100644 index 0000000..c285fdd --- /dev/null +++ b/zero-zero_build.patch @@ -0,0 +1,38 @@ +# HG changeset patch +# User andrew +# Date 1378914912 -3600 +# Wed Sep 11 16:55:12 2013 +0100 +# Node ID 56f4e181b8d485a01f125f2c681159cc940f6c26 +# Parent 09f439dfd7b9d6e022f7af71c328b5b4b6a36c23 +Set ZERO_BUILD in flags.make so it is set on rebuilds + +diff --git a/make/bsd/makefiles/buildtree.make b/make/bsd/makefiles/buildtree.make +--- openjdk/hotspot/make/bsd/makefiles/buildtree.make ++++ openjdk/hotspot/make/bsd/makefiles/buildtree.make +@@ -215,6 +215,7 @@ + echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \ + echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \ + echo "OPENJDK = $(OPENJDK)"; \ ++ echo "ZERO_BUILD = $(ZERO_BUILD)"; \ + echo; \ + echo "# Used for platform dispatching"; \ + echo "TARGET_DEFINES = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \ +diff --git a/make/linux/makefiles/buildtree.make b/make/linux/makefiles/buildtree.make +--- openjdk/hotspot/make/linux/makefiles/buildtree.make ++++ openjdk/hotspot/make/linux/makefiles/buildtree.make +@@ -195,7 +195,6 @@ + $(BUILDTREE_COMMENT); \ + echo; \ + echo "Platform_file = $(PLATFORM_FILE)" | sed 's|$(GAMMADIR)|$$(GAMMADIR)|'; \ +- echo "JVM_VARIANTS = $(JVM_VARIANTS)"; \ + sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \ + echo; \ + echo "GAMMADIR = $(GAMMADIR)"; \ +@@ -210,6 +209,7 @@ + echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \ + echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \ + echo "OPENJDK = $(OPENJDK)"; \ ++ echo "ZERO_BUILD = $(ZERO_BUILD)"; \ + echo; \ + echo "# Used for platform dispatching"; \ + echo "TARGET_DEFINES = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \