Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @ 2030:fb712ff22571
7000559: G1: assertion failure !outer || (full_collections_started == _full_collections_completed + 1)
Summary: The concurrent marking thread can complete its operation and increment the full GC counter during a Full GC. This causes the nesting of increments to the start and end of Full GCs that we are expecting to be wrong. the fix is for the marking thread to join the suspendible thread set before incrementing the counter so that it's blocked until the Full GC (or any other safepoint) is finished. The change also includes some minor code cleanup (I renamed a parameter).
Reviewed-by: brutisso, ysr
author | tonyp |
---|---|
date | Tue, 14 Dec 2010 16:19:44 -0500 |
parents | 016a3628c885 |
children | b03260081e9b |
comparison
equal
deleted
inserted
replaced
1996:f0ef5f5a460f | 2030:fb712ff22571 |
---|---|
641 // This is called at the end of either a concurrent cycle or a Full | 641 // This is called at the end of either a concurrent cycle or a Full |
642 // GC to update the number of full collections completed. Those two | 642 // GC to update the number of full collections completed. Those two |
643 // can happen in a nested fashion, i.e., we start a concurrent | 643 // can happen in a nested fashion, i.e., we start a concurrent |
644 // cycle, a Full GC happens half-way through it which ends first, | 644 // cycle, a Full GC happens half-way through it which ends first, |
645 // and then the cycle notices that a Full GC happened and ends | 645 // and then the cycle notices that a Full GC happened and ends |
646 // too. The outer parameter is a boolean to help us do a bit tighter | 646 // too. The concurrent parameter is a boolean to help us do a bit |
647 // consistency checking in the method. If outer is false, the caller | 647 // tighter consistency checking in the method. If concurrent is |
648 // is the inner caller in the nesting (i.e., the Full GC). If outer | 648 // false, the caller is the inner caller in the nesting (i.e., the |
649 // is true, the caller is the outer caller in this nesting (i.e., | 649 // Full GC). If concurrent is true, the caller is the outer caller |
650 // the concurrent cycle). Further nesting is not currently | 650 // in this nesting (i.e., the concurrent cycle). Further nesting is |
651 // supported. The end of the this call also notifies the | 651 // not currently supported. The end of the this call also notifies |
652 // FullGCCount_lock in case a Java thread is waiting for a full GC | 652 // the FullGCCount_lock in case a Java thread is waiting for a full |
653 // to happen (e.g., it called System.gc() with | 653 // GC to happen (e.g., it called System.gc() with |
654 // +ExplicitGCInvokesConcurrent). | 654 // +ExplicitGCInvokesConcurrent). |
655 void increment_full_collections_completed(bool outer); | 655 void increment_full_collections_completed(bool concurrent); |
656 | 656 |
657 unsigned int full_collections_completed() { | 657 unsigned int full_collections_completed() { |
658 return _full_collections_completed; | 658 return _full_collections_completed; |
659 } | 659 } |
660 | 660 |