问题描述
我知道sun.*
软件包不是官方Java API的一部分.但是,我需要使用一些与Perf
提供的功能类似的功能:特别是基本JVM度量标准(堆,线程,PermGen等),针对GC的JvmStat计数器等.是否有人知道Perf
和附带了很好的文档.
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.
我需要将其用作API,例如VisualVM的Tracer插件还不够好.有人对此发表评论吗?
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?
推荐答案
jvm中有围绕JVM性能计数器的包装器-attach 库,尽管文档并没有任何改善(即没有文档).
There are wrapper around JVM perfcounters in jvm-attach library, though documentation is not any better (i.e. it is absent).
jvm-attach 库本身是JVM诊断接口的包装,包括堆转储,JMX等
jvm-attach library itself is a wrapper around JVM diagnostic interfaces including heap dumps, JMX etc
这篇关于sun.misc.Perf文档或替代方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!