6735416: G1: runThese javasoft.sqe.tests.lang.thrd011.thrd01101.thrd01101 fails
6622418: G1: assert(false,"Non-balanced monitor enter/exit!") fails
Summary: The mark-sweep compact (which we use for full gc) wrapper did not save the mark words for biased locked objects. The fix is to trivially call the appropriate methods.
Reviewed-by: tonyp, ysr
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp Thu Aug 21 23:38:19 2008 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp Fri Aug 22 11:48:25 2008 -0700
@@ -50,6 +50,10 @@
allocate_stacks();
+ // We should save the marks of the currently locked biased monitors.
+ // The marking doesn't preserve the marks of biased objects.
+ BiasedLocking::preserve_marks();
+
mark_sweep_phase1(marked_for_unloading, clear_all_softrefs);
if (G1VerifyConcMark) {
@@ -67,7 +71,7 @@
mark_sweep_phase4();
GenMarkSweep::restore_marks();
-
+ BiasedLocking::restore_marks();
GenMarkSweep::deallocate_stacks();
// We must invalidate the perm-gen rs, so that it gets rebuilt.
--- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 Thu Aug 21 23:38:19 2008 -0400
+++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 Fri Aug 22 11:48:25 2008 -0700
@@ -19,7 +19,7 @@
// Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
// CA 95054 USA or visit www.sun.com if you need additional information or
// have any questions.
-//
+//
//
// NOTE: DO NOT CHANGE THIS COPYRIGHT TO NEW STYLE - IT WILL BREAK makeDeps!
@@ -100,7 +100,7 @@
concurrentZFThread.hpp concurrentGCThread.hpp
concurrentZFThread.hpp coTracker.hpp
-
+
dirtyCardQueue.cpp atomic.hpp
dirtyCardQueue.cpp dirtyCardQueue.hpp
dirtyCardQueue.cpp heapRegionRemSet.hpp
@@ -183,6 +183,7 @@
top.hpp g1_globals.hpp
g1MarkSweep.cpp aprofiler.hpp
+g1MarkSweep.cpp biasedLocking.hpp
g1MarkSweep.cpp codeCache.hpp
g1MarkSweep.cpp events.hpp
g1MarkSweep.cpp fprofiler.hpp