Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/vm_operations_g1.cpp @ 20522:d3fd73295885
8059466: Force young GC to initiate marking cycle when stat update is requested
Summary: Enable yc to be forced for stat update.
Reviewed-by: mgerdin, jcoomes
author | sjohanss |
---|---|
date | Mon, 06 Oct 2014 10:11:13 +0200 |
parents | 227a9e5e4b4a |
children | 4e4ebe50c8e3 |
comparison
equal
deleted
inserted
replaced
20520:4001310db3f5 | 20522:d3fd73295885 |
---|---|
93 void VM_G1IncCollectionPause::doit() { | 93 void VM_G1IncCollectionPause::doit() { |
94 G1CollectedHeap* g1h = G1CollectedHeap::heap(); | 94 G1CollectedHeap* g1h = G1CollectedHeap::heap(); |
95 assert(!_should_initiate_conc_mark || | 95 assert(!_should_initiate_conc_mark || |
96 ((_gc_cause == GCCause::_gc_locker && GCLockerInvokesConcurrent) || | 96 ((_gc_cause == GCCause::_gc_locker && GCLockerInvokesConcurrent) || |
97 (_gc_cause == GCCause::_java_lang_system_gc && ExplicitGCInvokesConcurrent) || | 97 (_gc_cause == GCCause::_java_lang_system_gc && ExplicitGCInvokesConcurrent) || |
98 _gc_cause == GCCause::_g1_humongous_allocation), | 98 _gc_cause == GCCause::_g1_humongous_allocation || |
99 "only a GC locker, a System.gc() or a hum allocation induced GC should start a cycle"); | 99 _gc_cause == GCCause::_update_allocation_context_stats_inc), |
100 "only a GC locker, a System.gc(), stats update or a hum allocation induced GC should start a cycle"); | |
100 | 101 |
101 if (_word_size > 0) { | 102 if (_word_size > 0) { |
102 // An allocation has been requested. So, try to do that first. | 103 // An allocation has been requested. So, try to do that first. |
103 _result = g1h->attempt_allocation_at_safepoint(_word_size, allocation_context(), | 104 _result = g1h->attempt_allocation_at_safepoint(_word_size, allocation_context(), |
104 false /* expect_null_cur_alloc_region */); | 105 false /* expect_null_cur_alloc_region */); |