Review Request for 6878481: Add performance counters in the JDK
David Holmes - Sun Microsystems
David.Holmes at Sun.COM
Thu Sep 3 00:08:03 UTC 2009
Hi Mandy,
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.
>
> Webrev:
> http://cr.openjdk.java.net/~mchung/6878481/webrev.00/
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
situations.
David
More information about the core-libs-dev
mailing list