# HG changeset patch # User iveresov # Date 1219430905 25200 # Node ID 8651a65ac4b4ae388b40e04319f27593845e18f1 # Parent 2564c620fa42979e712d9b8b45ca897c98fd2f5c 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 diff -r 2564c620fa42 -r 8651a65ac4b4 src/share/vm/gc_implementation/g1/g1MarkSweep.cpp --- a/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp Thu Aug 21 23:38:19 2008 -0400 +++ b/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. diff -r 2564c620fa42 -r 8651a65ac4b4 src/share/vm/gc_implementation/includeDB_gc_g1 --- a/src/share/vm/gc_implementation/includeDB_gc_g1 Thu Aug 21 23:38:19 2008 -0400 +++ b/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