# HG changeset patch # User jmasa # Date 1323442017 28800 # Node ID e9b91fd07263189b5548e66726ae2537139d889d # Parent 81f7362f7bed0bddc23a6e6e5620866f6f012fd3# Parent d23d2b18183edbb018864a7b7c8dd5312d88c7fd Merge diff -r 81f7362f7bed -r e9b91fd07263 make/bsd/makefiles/gcc.make --- a/make/bsd/makefiles/gcc.make Thu Dec 08 10:27:33 2011 -0800 +++ b/make/bsd/makefiles/gcc.make Fri Dec 09 06:46:57 2011 -0800 @@ -86,7 +86,6 @@ ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0" # Allow the user to turn off precompiled headers from the command line. ifneq ($(USE_PRECOMPILED_HEADER),0) -USE_PRECOMPILED_HEADER=1 PRECOMPILED_HEADER_DIR=. PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled/precompiled.hpp PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch @@ -216,7 +215,7 @@ endif # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. -ifneq ($(USE_PRECOMPILED_HEADER),1) +ifeq ($(USE_PRECOMPILED_HEADER),0) CFLAGS += -DDONT_USE_PRECOMPILED_HEADER endif diff -r 81f7362f7bed -r e9b91fd07263 make/bsd/makefiles/top.make --- a/make/bsd/makefiles/top.make Thu Dec 08 10:27:33 2011 -0800 +++ b/make/bsd/makefiles/top.make Fri Dec 09 06:46:57 2011 -0800 @@ -47,12 +47,10 @@ Plat_File = $(Platform_file) CDG = cd $(GENERATED); -ifdef USE_PRECOMPILED_HEADER -PrecompiledOption = -DUSE_PRECOMPILED_HEADER -UpdatePCH = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS) +ifneq ($(USE_PRECOMPILED_HEADER),0) +UpdatePCH = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS) else -UpdatePCH = \# precompiled header is not used -PrecompiledOption = +UpdatePCH = \# precompiled header is not used endif Cached_plat = $(GENERATED)/platform.current diff -r 81f7362f7bed -r e9b91fd07263 make/linux/makefiles/gcc.make --- a/make/linux/makefiles/gcc.make Thu Dec 08 10:27:33 2011 -0800 +++ b/make/linux/makefiles/gcc.make Fri Dec 09 06:46:57 2011 -0800 @@ -50,7 +50,6 @@ ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0" # Allow the user to turn off precompiled headers from the command line. ifneq ($(USE_PRECOMPILED_HEADER),0) -USE_PRECOMPILED_HEADER=1 PRECOMPILED_HEADER_DIR=. PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled/precompiled.hpp PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch @@ -165,7 +164,7 @@ endif # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. -ifneq ($(USE_PRECOMPILED_HEADER),1) +ifeq ($(USE_PRECOMPILED_HEADER),0) CFLAGS += -DDONT_USE_PRECOMPILED_HEADER endif diff -r 81f7362f7bed -r e9b91fd07263 make/linux/makefiles/top.make --- a/make/linux/makefiles/top.make Thu Dec 08 10:27:33 2011 -0800 +++ b/make/linux/makefiles/top.make Fri Dec 09 06:46:57 2011 -0800 @@ -47,12 +47,10 @@ Plat_File = $(Platform_file) CDG = cd $(GENERATED); -ifdef USE_PRECOMPILED_HEADER -PrecompiledOption = -DUSE_PRECOMPILED_HEADER -UpdatePCH = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS) +ifneq ($(USE_PRECOMPILED_HEADER),0) +UpdatePCH = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS) else -UpdatePCH = \# precompiled header is not used -PrecompiledOption = +UpdatePCH = \# precompiled header is not used endif Cached_plat = $(GENERATED)/platform.current diff -r 81f7362f7bed -r e9b91fd07263 make/solaris/makefiles/gcc.make --- a/make/solaris/makefiles/gcc.make Thu Dec 08 10:27:33 2011 -0800 +++ b/make/solaris/makefiles/gcc.make Fri Dec 09 06:46:57 2011 -0800 @@ -49,7 +49,6 @@ ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0" # Allow the user to turn off precompiled headers from the command line. ifneq ($(USE_PRECOMPILED_HEADER),0) -USE_PRECOMPILED_HEADER=1 PRECOMPILED_HEADER_DIR=. PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled/precompiled.hpp PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch @@ -142,7 +141,7 @@ endif # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. -ifneq ($(USE_PRECOMPILED_HEADER),1) +ifeq ($(USE_PRECOMPILED_HEADER),0) CFLAGS += -DDONT_USE_PRECOMPILED_HEADER endif diff -r 81f7362f7bed -r e9b91fd07263 src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Thu Dec 08 10:27:33 2011 -0800 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Fri Dec 09 06:46:57 2011 -0800 @@ -4052,7 +4052,7 @@ Par_ConcMarkingClosure(CMSCollector* collector, CMSConcMarkingTask* task, OopTaskQueue* work_queue, CMSBitMap* bit_map, CMSMarkStack* overflow_stack, CMSMarkStack* revisit_stack): - Par_KlassRememberingOopClosure(collector, NULL, revisit_stack), + Par_KlassRememberingOopClosure(collector, collector->ref_processor(), revisit_stack), _task(task), _span(collector->_span), _work_queue(work_queue), diff -r 81f7362f7bed -r e9b91fd07263 src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Thu Dec 08 10:27:33 2011 -0800 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Fri Dec 09 06:46:57 2011 -0800 @@ -1549,9 +1549,15 @@ _partially_young_cards_per_entry_ratio_seq->add(cards_per_entry_ratio); } - size_t rs_length_diff = _max_rs_lengths - _recorded_rs_lengths; - if (rs_length_diff >= 0) - _rs_length_diff_seq->add((double) rs_length_diff); + // It turns out that, sometimes, _max_rs_lengths can get smaller + // than _recorded_rs_lengths which causes rs_length_diff to get + // very large and mess up the RSet length predictions. We'll be + // defensive until we work out why this happens. + size_t rs_length_diff = 0; + if (_max_rs_lengths > _recorded_rs_lengths) { + rs_length_diff = _max_rs_lengths - _recorded_rs_lengths; + } + _rs_length_diff_seq->add((double) rs_length_diff); size_t copied_bytes = surviving_bytes; double cost_per_byte_ms = 0.0; diff -r 81f7362f7bed -r e9b91fd07263 src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp --- a/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp Thu Dec 08 10:27:33 2011 -0800 +++ b/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp Fri Dec 09 06:46:57 2011 -0800 @@ -84,8 +84,11 @@ // slightly paranoid test; I'm trying to catch potential // problems before we go into push_on_queue to know where the // problem is coming from - assert(obj == oopDesc::load_decode_heap_oop(p), - "p should still be pointing to obj"); + assert((obj == oopDesc::load_decode_heap_oop(p)) || + (obj->is_forwarded() && + obj->forwardee() == oopDesc::load_decode_heap_oop(p)), + "p should still be pointing to obj or to its forwardee"); + _par_scan_state->push_on_queue(p); } else { _par_scan_state->update_rs(_from, p, _par_scan_state->queue_num());