RFR (S): 8010916: Add tenuring threshold to young garbage collection events

Erik Helin erik.helin at oracle.com
Mon Apr 1 09:04:08 UTC 2013


Hi all,

this change adds the field "tenuringThreshold" to the 
"vm/gc/collector/young_garbage_collection" event.

The code in gcTrace.hpp/cpp have been slightly adjusted to support this.
The hierarchy of tracers is:

     G1NewTracer -> YoungGCTracer -> GCTracer

where "->" means "inherits from".

Previously, the method "report_gc_end_impl" was virtual in "GCTracer" to 
enable "YoungGCTracer" to send the young GC event when "report_gc_end" 
was called on a GCTracer, as in the following:

     void GCTracer::report_gc_end(...) {
       // do other stuff
       report_gc_end_impl(...);
     }

     void YoungGCTracer::report_gc_end_impl(...) {
       // send young gc event here
     }

In this change, YoungGCTracer now has a method "report_young_gc_end" 
that is virtual and that G1NewTracer overrides. This means that 
YoungGCTracer does not need to override the method "report_gc_end_impl" 
from GCTracer. This also means that all young collectors now also must 
call "report_young_gc_end".

This change was needed, since report_young_gc_end must take the tenuring 
threshold as a parameter, something that was not possible to do with 
"report_gc_end_impl".

Webrev:
http://cr.openjdk.java.net/~ehelin/8010916/webrev.00/

Bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8010916

Testing:
JPRT

Thanks,
Erik



More information about the hotspot-gc-dev mailing list