Review Request for 6878481: Add performance counters in the JDK
David Holmes - Sun Microsystems
David.Holmes at Sun.COM
Wed Sep 2 17:08:03 PDT 2009
Mandy Chung said the following on 09/03/09 05:25:
> This is related to 6857194: Add hotspot new perf counters to aid class
> loading performance measurement.
> It's useful to add performance counters in the library code so that perf
> data from the JDK and VM can be collected and output in a unified way
> (written in the jvmstat shared memory buffer). I add a simple
> sun.misc.PerfCounter class to maintain the list of perf counters for the
> library to use. This fix only instruments the class loading and jar/zip
> to collect simple basic metrics. Additional perf counters will be
> added in the future.
What is the performance overhead here? This seems like a lot of extra
code if you don't want to read the counters. Is there not some way to
only conditionally enable them?
We're sticking in a lot of System.nanoTime() calls and on some systems
it isn't necessarily cheap eg Windows - see 6440250. Even if it is
cheap, there are potentially a lot of them in classloading intensive
More information about the core-libs-dev