RFR: 7903455: JMH: Add "mempool" profiler [v2]
Eric Caspole
ecaspole at openjdk.org
Fri Apr 14 16:09:00 UTC 2023
> I started off to show only the code cache related size, but I don't see any reason to not print all the available mbean pool info. We often adapt app or library code to run as JMH, to use all its benefits. In those cases seeing the code cache stats is more interesting than say, for a regular JDK API JMH benchmark. I verified the CodeHeap stats match well with +PrintCodeCache. There is mbean pool data for all the GCs as well.
>
> Example output:
>
> Benchmark (iterations) Mode Cnt Score Error Units
> SpillCode.testSpillForManyInts 10 avgt 5 705.433 ± 9.570 ns/op
> SpillCode.testSpillForManyInts:·CodeHeap 'non-nmethods'.used 10 avgt 5 1139.000 kB
> SpillCode.testSpillForManyInts:·CodeHeap 'non-profiled nmethods'.used 10 avgt 5 209.750 kB
> SpillCode.testSpillForManyInts:·CodeHeap 'profiled nmethods'.used 10 avgt 5 924.875 kB
> SpillCode.testSpillForManyInts:·Compressed Class Space.used 10 avgt 5 403.375 kB
> SpillCode.testSpillForManyInts:·G1 Eden Space.used 10 avgt 5 8192.000 kB
> SpillCode.testSpillForManyInts:·G1 Old Gen.used 10 avgt 5 8160.000 kB
> SpillCode.testSpillForManyInts:·G1 Survivor Space.used 10 avgt 5 ≈ 0 kB
> SpillCode.testSpillForManyInts:·Metaspace.used 10 avgt 5 3617.320 kB
> SpillCode.testSpillForManyInts:·Total CodeHeap.used 10 avgt 5 2267.000 kB
> SpillCode.testSpillForManyInts:·Total MemPools.used 10 avgt 5 22639.695 kB
Eric Caspole has updated the pull request incrementally with one additional commit since the last revision:
Add newline at end of file
-------------
Changes:
- all: https://git.openjdk.org/jmh/pull/99/files
- new: https://git.openjdk.org/jmh/pull/99/files/01d175d7..72c014a2
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jmh&pr=99&range=01
- incr: https://webrevs.openjdk.org/?repo=jmh&pr=99&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jmh/pull/99.diff
Fetch: git fetch https://git.openjdk.org/jmh.git pull/99/head:pull/99
PR: https://git.openjdk.org/jmh/pull/99
More information about the jmh-dev
mailing list