RFR (S): 8009232: Improve stats gathering code for reference processor

Erik Helin erik.helin at oracle.com
Fri Mar 1 03:34:33 PST 2013


Hi all,

this change refactors the way the reference processing statistics are
being collected from the reference processor.

Summary:
Before, the statistics were collected by calling
ReferenceProcessor::collect_statistics immediately after a call to
ReferenceProcessor::process_discovered_references. With this change, the
method process_discovered_references instead returns
the statistics.

The benefit is that there is now no need to keep track of an internal
state in ReferenceProcessor since the ReferenceProcessorStats can be put
on the stack in process_discovered_references. Furthermore, the code is
more maintainable, since the old code required the calls to
process_discovered_references and collect_statistics to go "hand in
hand". Now, one only has to care about the call to
process_discovered_references.

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

Bug:
https://jbs.oracle.com/bugs/browse/JDK-8009232

Testing:
JPRT

Thanks,
Erik


More information about the hotspot-gc-dev mailing list