changeset 6062:1096fc5a52eb

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
author johnc
date Tue, 15 May 2012 09:49:18 -0700
parents 33e366609904
children cdfa5139bd58
files src/share/vm/gc_implementation/g1/vm_operations_g1.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp	Mon May 14 21:07:28 2012 -0700
+++ b/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");