6944166: G1: explicit GCs are not always handled correctly

G1 was not handling explicit GCs correctly in many ways. It does now. See the CR for the list of improvements contained in this changeset.

Reviewed-by: iveresov, ysr, johnc
This commit is contained in:
Antonios Printezis 2010-06-28 14:13:17 -04:00
parent 968deb7658
commit dfc84e8c89
12 changed files with 291 additions and 71 deletions

View file

@ -266,6 +266,12 @@ void ConcurrentMarkThread::run() {
_cm->clearNextBitmap();
_sts.leave();
}
// Update the number of full collections that have been
// completed. This will also notify the FullGCCount_lock in case a
// Java thread is waiting for a full GC to happen (e.g., it
// called System.gc() with +ExplicitGCInvokesConcurrent).
g1->increment_full_collections_completed(true /* outer */);
}
assert(_should_terminate, "just checking");