问题
I understand that the sun.*
packages are not part of the official Java API. However, I need to use some functionality similar to what Perf
offers: specifically Basic JVM Metrics (Heap, Threads, PermGen, etc), JvmStat counters to GC, etc. Does anybody know a wrapper library around Perf
and PerfInstrumentation
which comes with a good documentation.
I need to use it as an API so e.g. the VisualVM's Tracer plugin is not good enough. Anybody has a comment on that?
回答1:
There are wrapper around JVM perfcounters in jvm-attach library, though documentation is not any better (i.e. it is absent).
jvm-attach library itself is a wrapper around JVM diagnostic interfaces including heap dumps, JMX etc
来源:https://stackoverflow.com/questions/33367838/sun-misc-perf-documentation-or-alternative