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:
sun.*
Perf
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