RFR: 8316814: NMT: A separate script or Java program is needed to analyze and make useful reports ouf of JMH benchmarks outputs.
Afshin Zafari
azafari at openjdk.org
Fri Oct 20 09:30:48 UTC 2023
It reads the benchmark report file whose path is given as command line. Then extract percentage of overhead of NMT modes for different methods used in benchmarks.
Locally tested with some sample report files.
>From an input benchmark report like this:
# JMH version: 1.37
# VM version: JDK 22-internal, OpenJDK 64-Bit Server VM,......in...
# VM invoker:.....
# VM options: -XX:NativeMemoryTracking=detail --add-exports java.base/jdk.internal.misc=ALL-UNNAMED -Djava.library.path=...
# Blackhole mode: compiler (auto-detected, use -Djmh.blackhole.autoDetect=false to disable)
# Warmup: 2 iterations, 1 s each
# Measurement: 5 iterations, 1 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: org.openjdk.bench.vm.runtime.NMTBenchmark.NMTDetail.mixAallocateFreeMemory
# Parameters: (N = 100000, THREADS = 4)
.
.
.
Benchmark (N) (THREADS) Mode Cnt Score Error Units
NMTBenchmark.NMTDetail.mixAallocateFreeMemory 100000 0 avgt 10 87.010 ? 10.630 ms/op
NMTBenchmark.NMTDetail.mixAallocateFreeMemory 100000 4 avgt 10 2.473 ? 0.728 ms/op
NMTBenchmark.NMTDetail.mixAllocateReallocateMemory 100000 0 avgt 10 225.054 ? 4.381 ms/op
NMTBenchmark.NMTDetail.mixAllocateReallocateMemory 100000 4 avgt 10 2.247 ? 0.599 ms/op
NMTBenchmark.NMTDetail.onlyAllocateMemory 100000 0 avgt 10 147.346 ? 8.226 ms/op
NMTBenchmark.NMTDetail.onlyAllocateMemory 100000 4 avgt 10 2.285 ? 0.611 ms/op
NMTBenchmark.NMTOff.mixAallocateFreeMemory 100000 0 avgt 10 40.405 ? 8.115 ms/op
NMTBenchmark.NMTOff.mixAallocateFreeMemory 100000 4 avgt 10 2.299 ? 0.658 ms/op
NMTBenchmark.NMTOff.mixAllocateReallocateMemory 100000 0 avgt 10 158.700 ? 10.750 ms/op
NMTBenchmark.NMTOff.mixAllocateReallocateMemory 100000 4 avgt 10 2.282 ? 0.723 ms/op
NMTBenchmark.NMTOff.onlyAllocateMemory 100000 0 avgt 10 113.949 ? 21.257 ms/op
NMTBenchmark.NMTOff.onlyAllocateMemory 100000 4 avgt 10 2.155 ? 0.682 ms/op
NMTBenchmark.NMTSummary.mixAallocateFreeMemory 100000 0 avgt 10 50.436 ? 4.576 ms/op
NMTBenchmark.NMTSummary.mixAallocateFreeMemory 100000 4 avgt 10 2.192 ? 0.737 ms/op
NMTBenchmark.NMTSummary.mixAllocateReallocateMemory 100000 0 avgt 10 170.408 ? 4.556 ms/op
NMTBenchmark.NMTSummary.mixAllocateReallocateMemory 100000 4 avgt 10 2.344 ? 0.645 ms/op
NMTBenchmark.NMTSummary.onlyAllocateMemory 100000 0 avgt 10 117.480 ? 8.846 ms/op
NMTBenchmark.NMTSummary.onlyAllocateMemory 100000 4 avgt 10 2.367 ? 0.694 ms/op
it creates summary like this:
Method Threads Off Summary Detail
mixAallocateFreeMemory 0 40.41 50.44 87.01
24.83% 115.34%
mixAallocateFreeMemory 4 2.30 2.19 2.47
-4.65% 7.57%
mixAllocateReallocateMemory 0 158.70 170.41 225.05
7.38% 41.81%
mixAllocateReallocateMemory 4 2.28 2.34 2.25
2.72% -1.53%
onlyAllocateMemory 0 113.95 117.48 147.35
3.10% 29.31%
onlyAllocateMemory 4 2.16 2.37 2.29
9.84% 6.03%
-------------
Commit messages:
- white spac corrected.
- review comments applied.
- Error values added, results shown in one line.
- 8316814: NMT: A separate script or Java program is needed to analyze and make useful reports ouf of JMH benchmarks outputs.
Changes: https://git.openjdk.org/jdk/pull/16070/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16070&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8316814
Stats: 152 lines in 1 file changed: 152 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/16070.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16070/head:pull/16070
PR: https://git.openjdk.org/jdk/pull/16070
More information about the hotspot-runtime-dev
mailing list