diff src/share/vm/gc_implementation/g1/vm_operations_g1.cpp @ 23472:047a642c9729

8065579: WB method to start G1 concurrent mark cycle should be introduced Summary: Add a WhiteBox callback to the VM to start a concurrent mark cycle in G1. Reviewed-by: tschatzl, sjohanss Contributed-by: Leonid Mesnik <leonid.mesnik@oracle.com>
author kevinw
date Wed, 02 Dec 2015 13:58:34 +0530
parents af8f16ac392c
children
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp	Tue Dec 15 09:46:51 2015 +0100
+++ b/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp	Wed Dec 02 13:58:34 2015 +0530
@@ -90,12 +90,8 @@
 
 void VM_G1IncCollectionPause::doit() {
   G1CollectedHeap* g1h = G1CollectedHeap::heap();
-  assert(!_should_initiate_conc_mark ||
-  ((_gc_cause == GCCause::_gc_locker && GCLockerInvokesConcurrent) ||
-   (_gc_cause == GCCause::_java_lang_system_gc && ExplicitGCInvokesConcurrent) ||
-    _gc_cause == GCCause::_g1_humongous_allocation ||
-    _gc_cause == GCCause::_update_allocation_context_stats_inc),
-      "only a GC locker, a System.gc(), stats update or a hum allocation induced GC should start a cycle");
+  assert(!_should_initiate_conc_mark || g1h->should_do_concurrent_full_gc(_gc_cause),
+      "only a GC locker, a System.gc(), stats update, whitebox, or a hum allocation induced GC should start a cycle");
 
   if (_word_size > 0) {
     // An allocation has been requested. So, try to do that first.