7168294: G1: Some Full GCs incorrectly report GC cause as "No GC"
Summary: GC cause was not being set by the VM_G1CollectForAllocation VM operation.
Reviewed-by: jmasa, ysr, brutisso
--- a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp Mon May 14 21:07:28 2012 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp Tue May 15 09:49:18 2012 -0700
@@ -42,6 +42,7 @@
void VM_G1CollectForAllocation::doit() {
G1CollectedHeap* g1h = G1CollectedHeap::heap();
+ GCCauseSetter x(g1h, _gc_cause);
_result = g1h->satisfy_failed_allocation(_word_size, &_pause_succeeded);
assert(_result == NULL || _pause_succeeded,
"if we get back a result, the pause should have succeeded");