Hi David,

Performance counters are specific to Hotspot and can be dumped via JCMD as documented below.

https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/tooldescr006.html

I could not find any documentation as to what each performance counter means. But I know JMXServiceURL is published as one of perf counter.

I don't think UsePerfData vm flag has any effect on perf counters.

@see https://bugs.openjdk.java.net/browse/JDK-8069149

Regards

Harsha

P.S. Below is the list of perf counters I was able to dump.

    java.ci.totalTime --> 9894679495
    java.cls.loadedClasses --> 2104
    java.cls.sharedLoadedClasses --> 0
    java.cls.sharedUnloadedClasses --> 0
    java.cls.unloadedClasses --> 0
java.property.java.class.path --> /home/harsha/work/jdk10_PerfCounter/build/linux-x86_64-normal-server-fastdebug/nb-jtreg/work/classes/java/lang/management:/home/harsha/work/jdk10_PerfCounter/jdk/test/java/lang/management:/home/harsha/netbeans-8.2/platform/modules/ext/testng-6.8.1-dist.jar:/home/harsha/.netbeans/8.2/modules/ext/javatest.jar:/home/harsha/.netbeans/8.2/modules/ext/jtreg.jar java.property.java.home --> /home/harsha/work/jdk10_PerfCounter/build/linux-x86_64-normal-server-fastdebug/jdk java.property.java.library.path --> /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
    java.property.java.version --> 10-internal
    java.property.java.vm.info --> mixed mode
    java.property.java.vm.name --> Java HotSpot(TM) 64-Bit Server VM
java.property.java.vm.specification.name --> Java Virtual Machine Specification
    java.property.java.vm.specification.vendor --> Oracle Corporation
    java.property.java.vm.specification.version --> 10
    java.property.java.vm.vendor --> Oracle Corporation
java.property.java.vm.version --> 10-internal+0-adhoc.harsha.jdk10PerfCounter
    java.property.jdk.debug --> fastdebug
java.rt.vmArgs --> -Dtest.src=/home/harsha/work/jdk10_PerfCounter/jdk/test/java/lang/management -Dtest.src.path=/home/harsha/work/jdk10_PerfCounter/jdk/test/java/lang/management -Dtest.classes=/home/harsha/work/jdk10_PerfCounter/build/linux-x86_64-normal-server-fastdebug/nb-jtreg/work/classes/java/lang/management -Dtest.class.path=/home/harsha/work/jdk10_PerfCounter/build/linux-x86_64-normal-server-fastdebug/nb-jtreg/work/classes/java/lang/management -Dtest.vm.opts= -Dtest.tool.vm.opts= -Dtest.compiler.opts=-g -Dtest.java.opts= -Dtest.jdk=/home/harsha/work/jdk10_PerfCounter/build/linux-x86_64-normal-server-fastdebug/jdk -Dcompile.jdk=/home/harsha/work/jdk10_PerfCounter/build/linux-x86_64-normal-server-fastdebug/jdk -Dtest.timeout.factor=10.0 -Dtest.modules=java.management
    java.rt.vmFlags -->
    java.threads.daemon --> 4
    java.threads.live --> 6
    java.threads.livePeak --> 6
    java.threads.started --> 6
    jdk.module.bootstrap.defineBaseTime --> 2435193646
    jdk.module.bootstrap.layerCreateTime --> 13317562
    jdk.module.bootstrap.loadModulesTime --> 14338283
    jdk.module.bootstrap.optionsAndRootsTime --> 17304889
    jdk.module.bootstrap.resolveTime --> 55133833
    jdk.module.bootstrap.systemModulesTime --> 41492856
    jdk.module.bootstrap.totalTime --> 2593369105
    jdk.module.finder.modulepath.modules --> 81
    jdk.module.finder.modulepath.scanTime --> 2415452842
sun.ci.lastFailedMethod --> java/nio/file/FileTreeIterator fetchNextIfNeeded
    sun.ci.lastFailedType --> 1
    sun.ci.lastInvalidatedMethod -->
    sun.ci.lastInvalidatedType --> 0
    sun.ci.lastMethod --> java/lang/invoke/MemberName$Factory resolveOrFail
    sun.ci.lastSize --> 66
    sun.ci.lastType --> 1
    sun.ci.nmethodBucketsAllocated --> 453
    sun.ci.nmethodBucketsDeallocated --> 0
    sun.ci.nmethodBucketsStale --> 0
    sun.ci.nmethodBucketsStaleAccumulated --> 0
    sun.ci.nmethodCodeSize --> 2033472
    sun.ci.nmethodSize --> 3243232
    sun.ci.osrBytes --> 3066
    sun.ci.osrCompiles --> 15
    sun.ci.osrTime --> 330004625
    sun.ci.standardBytes --> 118206
    sun.ci.standardCompiles --> 1139
    sun.ci.standardTime --> 9652101881
    sun.ci.threads --> 3
    sun.ci.totalBailouts --> 2
    sun.ci.totalCompiles --> 1154
    sun.ci.totalInvalidates --> 0
    sun.classloader.findClassTime --> 2068382
    sun.classloader.findClasses --> 1
    sun.classloader.parentDelegationTime --> 23310
    sun.cls.appClassBytes --> 945293
    sun.cls.appClassLoadCount --> 360
    sun.cls.appClassLoadTime --> 664947306
    sun.cls.appClassLoadTime.self --> 412849295
    sun.cls.classInitTime --> 1102258326
    sun.cls.classInitTime.self --> 976802405
    sun.cls.classLinkedTime --> 680729996
    sun.cls.classLinkedTime.self --> 430206421
    sun.cls.classVerifyTime --> 252472122
    sun.cls.classVerifyTime.self --> 105603174
    sun.cls.defineAppClassTime --> 273298992
    sun.cls.defineAppClassTime.self --> 257133022
    sun.cls.defineAppClasses --> 261
    sun.cls.initializedClasses --> 1732
    sun.cls.isUnsyncloadClassSet --> 0
    sun.cls.jniDefineClassNoLockCalls --> 0
    sun.cls.jvmDefineClassNoLockCalls --> 225
    sun.cls.jvmFindLoadedClassNoLockCalls --> 582
    sun.cls.linkedClasses --> 1960
    sun.cls.loadInstanceClassFailRate --> 0
    sun.cls.loadedBytes --> 4041536
    sun.cls.lookupSysClassTime --> 0
    sun.cls.methodBytes --> 2346336
    sun.cls.nonSystemLoaderLockContentionRate --> 0
    sun.cls.parseClassTime --> 0
    sun.cls.parseClassTime.self --> 0
    sun.cls.sharedClassLoadTime --> 396807
    sun.cls.sharedLoadedBytes --> 0
    sun.cls.sharedUnloadedBytes --> 0
    sun.cls.sysClassBytes --> 6782757
    sun.cls.sysClassLoadTime --> 586961829
    sun.cls.systemLoaderLockContentionRate --> 0
    sun.cls.time --> 2182594317
    sun.cls.unloadedBytes --> 0
    sun.cls.unsafeDefineClassCalls --> 390
    sun.cls.verifiedClasses --> 182
    sun.gc.cause --> No GC
    sun.gc.collector.0.invocations --> 1
    sun.gc.collector.0.lastEntryTime --> 1132440403
    sun.gc.collector.0.lastExitTime --> 1140612084
    sun.gc.collector.0.name --> G1 incremental collections
    sun.gc.collector.0.time --> 8172070
    sun.gc.collector.1.invocations --> 0
    sun.gc.collector.1.lastEntryTime --> 0
    sun.gc.collector.1.lastExitTime --> 0
    sun.gc.collector.1.name --> G1 stop-the-world full collections
    sun.gc.collector.1.time --> 0
    sun.gc.compressedclassspace.capacity --> 655360
    sun.gc.compressedclassspace.maxCapacity --> 1073741824
    sun.gc.compressedclassspace.minCapacity --> 0
    sun.gc.compressedclassspace.used --> 514992
    sun.gc.generation.0.agetable.bytes.00 --> 0
    sun.gc.generation.0.agetable.bytes.01 --> 555624
    sun.gc.generation.0.agetable.bytes.02 --> 0
    sun.gc.generation.0.agetable.bytes.03 --> 0
    sun.gc.generation.0.agetable.bytes.04 --> 0
    sun.gc.generation.0.agetable.bytes.05 --> 0
    sun.gc.generation.0.agetable.bytes.06 --> 0
    sun.gc.generation.0.agetable.bytes.07 --> 0
    sun.gc.generation.0.agetable.bytes.08 --> 0
    sun.gc.generation.0.agetable.bytes.09 --> 0
    sun.gc.generation.0.agetable.bytes.10 --> 0
    sun.gc.generation.0.agetable.bytes.11 --> 0
    sun.gc.generation.0.agetable.bytes.12 --> 0
    sun.gc.generation.0.agetable.bytes.13 --> 0
    sun.gc.generation.0.agetable.bytes.14 --> 0
    sun.gc.generation.0.agetable.bytes.15 --> 0
    sun.gc.generation.0.agetable.size --> 16
    sun.gc.generation.0.capacity --> 165675032
    sun.gc.generation.0.maxCapacity --> 4179623960
    sun.gc.generation.0.minCapacity --> 24
    sun.gc.generation.0.name --> young
    sun.gc.generation.0.space.0.capacity --> 164626440
    sun.gc.generation.0.space.0.initCapacity --> 15728648
    sun.gc.generation.0.space.0.maxCapacity --> 4179623944
    sun.gc.generation.0.space.0.name --> eden
    sun.gc.generation.0.space.0.used --> 144703488
    sun.gc.generation.0.space.1.capacity --> 8
    sun.gc.generation.0.space.1.initCapacity --> 8
    sun.gc.generation.0.space.1.maxCapacity --> 8
    sun.gc.generation.0.space.1.name --> s0
    sun.gc.generation.0.space.1.used --> 0
    sun.gc.generation.0.space.2.capacity --> 1048584
    sun.gc.generation.0.space.2.initCapacity --> 8
    sun.gc.generation.0.space.2.maxCapacity --> 4179623944
    sun.gc.generation.0.space.2.name --> s1
    sun.gc.generation.0.space.2.used --> 1048576
    sun.gc.generation.0.spaces --> 3
    sun.gc.generation.1.capacity --> 96469000
    sun.gc.generation.1.maxCapacity --> 4179623944
    sun.gc.generation.1.minCapacity --> 8
    sun.gc.generation.1.name --> old
    sun.gc.generation.1.space.0.capacity --> 96469000
    sun.gc.generation.1.space.0.initCapacity --> 246415368
    sun.gc.generation.1.space.0.maxCapacity --> 4179623944
    sun.gc.generation.1.space.0.name --> space
    sun.gc.generation.1.space.0.used --> 0
    sun.gc.generation.1.spaces --> 1
    sun.gc.lastCause --> G1 Evacuation Pause
    sun.gc.metaspace.capacity --> 6160384
    sun.gc.metaspace.maxCapacity --> 1082130432
    sun.gc.metaspace.minCapacity --> 0
    sun.gc.metaspace.used --> 5701904
    sun.gc.policy.collectors --> 1
    sun.gc.policy.desiredSurvivorSize --> 1048576
    sun.gc.policy.generations --> 3
    sun.gc.policy.maxTenuringThreshold --> 15
    sun.gc.policy.name --> GarbageFirst
    sun.gc.policy.tenuringThreshold --> 15
    sun.gc.tlab.alloc --> 2532300
    sun.gc.tlab.allocThreads --> 3
    sun.gc.tlab.fastWaste --> 0
    sun.gc.tlab.fills --> 69
    sun.gc.tlab.gcWaste --> 73306
    sun.gc.tlab.maxFastWaste --> 0
    sun.gc.tlab.maxFills --> 67
    sun.gc.tlab.maxGcWaste --> 36674
    sun.gc.tlab.maxSlowAlloc --> 0
    sun.gc.tlab.maxSlowWaste --> 5028
    sun.gc.tlab.slowAlloc --> 0
    sun.gc.tlab.slowWaste --> 5028
    sun.os.hrt.frequency --> 1000000000
    sun.os.hrt.ticks --> 6279815676
sun.property.sun.boot.library.path --> /home/harsha/work/jdk10_PerfCounter/build/linux-x86_64-normal-server-fastdebug/jdk/lib
    sun.rt._sync_ContendedLockAttempts --> 0
    sun.rt._sync_Deflations --> 3
    sun.rt._sync_EmptyNotifications --> 0
    sun.rt._sync_FailedSpins --> 0
    sun.rt._sync_FutileWakeups --> 0
    sun.rt._sync_Inflations --> 8
    sun.rt._sync_MonExtant --> 4
    sun.rt._sync_MonInCirculation --> 0
    sun.rt._sync_MonScavenged --> 0
    sun.rt._sync_Notifications --> 2
    sun.rt._sync_Parks --> 2
    sun.rt._sync_PrivateA --> 0
    sun.rt._sync_PrivateB --> 0
    sun.rt._sync_SlowEnter --> 0
    sun.rt._sync_SlowExit --> 0
    sun.rt._sync_SlowNotify --> 0
    sun.rt._sync_SlowNotifyAll --> 0
    sun.rt._sync_SuccessfulSpins --> 0
    sun.rt.applicationTime --> 4337190130
    sun.rt.createVmBeginTime --> 1488277242189
    sun.rt.createVmEndTime --> 1488277244988
sun.rt.internalVersion --> Java HotSpot(TM) 64-Bit Server VM (fastdebug 10-internal+0-adhoc.harsha.jdk10PerfCounter) for linux-amd64 JRE (10-internal+0-adhoc.harsha.jdk10PerfCounter), built on Feb 25 2017 22:24:55 by "harsha" with gcc 5.4.0 20160609 sun.rt.javaCommand --> com.sun.javatest.regtest.agent.MainWrapper /home/harsha/work/jdk10_PerfCounter/build/linux-x86_64-normal-server-fastdebug/nb-jtreg/work/java/lang/management/PerfCounterMBeanTest.d/testng.0.jta java/lang/management/PerfCounterMBeanTest.java PerfCounterMBeanTest sun.rt.jvmCapabilities --> 1100000000000000000000000000000000000000000000000000000000000000
    sun.rt.jvmVersion --> 167772160
    sun.rt.safepointSyncTime --> 35150781
    sun.rt.safepointTime --> 44606495
    sun.rt.safepoints --> 9
    sun.rt.vmInitDoneTime --> 1488277242348
    sun.threads.vmOperationTime --> 8730462
    sun.urlClassLoader.readClassBytesTime --> 0
    sun.zip.zipFile.openTime --> 32909964
    sun.zip.zipFiles --> 3


On Tuesday 28 February 2017 12:36 PM, David Holmes wrote:
Hi Harsha,

Not a review :)

On 27/02/2017 2:50 AM, Harsha Wardhana B wrote:
Hi All,

Please review the below RFE,

JDK-8007141 <http://JDK-8007141> : Introduce Dynamic MBean exposing the
perf counters.

What perf counters are these and where/how are they currently documented?

They may be affected by the UsePerfData VM flag (which some/most of the management code seems to be ignorant of).

Thanks,
David
-----

with webrev at,

http://cr.openjdk.java.net/~hb/8007141/webrev.00/

Appreciate if I can get inputs for below.

1. Location of HotSpotPerfCounterMBean. It is located at
src/jdk.management/share/classes/com/sun/management/internal. It can be
moved to src/jdk.management/share/classes/com/sun/management if required.

2. Javadoc comments for HotSpotPerfCounterMBean. Not sure if it is adequate.

3. Description for each attribute of MBean. I am using getUnits(),
getVariability(), and getFlags() for description. I am not sure if that
is the right description. Appreciate inputs from someone who knows perf
counters well.

Thanks

Harsha



Reply via email to