changeset 4519:e41e48824311

8007003: ParNew sends the heap summary too early Summary: Send the event after the early exit Reviewed-by: ehelin, brutisso
author jwilhelm
date Tue, 12 Mar 2013 16:28:37 +0100
parents e532bbc127b1
children 739a10899202
files src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Thu Mar 07 12:45:07 2013 -0800
+++ b/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Tue Mar 12 16:28:37 2013 +0100
@@ -893,10 +893,6 @@
   GenCollectedHeap* gch = GenCollectedHeap::heap();
 
   _gc_timer->register_gc_start(os::elapsed_counter());
-  ParNewTracer gc_tracer;
-  gc_tracer.report_gc_start(gch->gc_cause(), _gc_timer->gc_start());
-
-  gch->trace_heap_before_gc(&gc_tracer);
 
   assert(gch->kind() == CollectedHeap::GenCollectedHeap,
     "not a CMS generational heap");
@@ -927,6 +923,10 @@
   }
   assert(to()->is_empty(), "Else not collection_attempt_is_safe");
 
+  ParNewTracer gc_tracer;
+  gc_tracer.report_gc_start(gch->gc_cause(), _gc_timer->gc_start());
+  gch->trace_heap_before_gc(&gc_tracer);
+
   init_assuming_no_promotion_failure();
 
   if (UseAdaptiveSizePolicy) {