xperfasm does not print anything and seems hung at the end

Eric Caspole eric.caspole at oracle.com
Wed Feb 5 19:37:30 UTC 2025


Hi jmh-dev,
I am trying to get xperfasm to work on Windows Server 2019 after a long 
time since I last used it, but it seems to hang or block at the end and 
never prints any results as shown at the bottom. I have verified my 
hsdis is in .\bin and +PrintAssembly works correctly, with -version for 
example.  Also the -lprof seems to show that everything is set up 
correctly for xperfasm as shown below:


PS C:\Users\opc\Downloads> .\jdk23\jdk-23+37_windows-x64_bin\jdk-23\bin\java -jar .\benchmarks.jar -lprof

Supported profilers:
            cl: Classloader profiling via standard MBeans
          comp: JIT compiler profiling via standard MBeans
            gc: GC profiling via standard MBeans
           jfr: Java Flight Recorder profiler
       mempool: Memory pool/footprint profiling via standard MBeans
        pauses: Pauses profiler
    safepoints: Safepoints profiler
         stack: Simple and naive Java stack profiler
      xperfasm: Windows xperf + PrintAssembly Profiler


But the profile is never emitted, the process is hung as shown. Is there 
any extra setup required for Windows Server 2019 or anyone have an idea 
what to try next? FWIW here I am running in PowerShell as Administrator. 
Rebooting did not make any difference.
Thanks,
Eric

PS C:\Users\opc\Downloads> .\jdk23\jdk-23+37_windows-x64_bin\jdk-23\bin\java -jar .\benchmarks.jar Hello -f 1 -wi 3 -i 3 -prof xperfasm
# JMH version: 1.38-SNAPSHOT
# VM version: JDK 23, Java HotSpot(TM) 64-Bit Server VM, 23+37-2369
# VM invoker: C:\Users\opc\Downloads\jdk23\jdk-23+37_windows-x64_bin\jdk-23\bin\java.exe
# VM options: <none>
# Blackhole mode: compiler (auto-detected, use -Djmh.blackhole.autoDetect=false to disable)
# Warmup: 3 iterations, 10 s each
# Measurement: 3 iterations, 10 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Throughput, ops/time
# Benchmark: org.openjdk.jmh.samples.JMHSample_01_HelloWorld.wellHelloThere
# Run progress: 0.00% complete, ETA 00:01:00
# Fork: 1 of 1
# Preparing profilers: WinPerfAsmProfiler
# Profilers consume stdout and stderr from target VM, use -v EXTRA to copy to console
# Warmup Iteration   1: 2336674447.499 ops/s
# Warmup Iteration   2: 2342055342.622 ops/s
# Warmup Iteration   3: 2340929161.098 ops/s
Iteration   1: 2344103235.903 ops/s
Iteration   2: 2343460425.716 ops/s
Iteration   3: 2344422471.924 ops/s
# Processing profiler results: WinPerfAsmProfiler

[ no further output happens and the process does not exit ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jmh-dev/attachments/20250205/3c1a1183/attachment.htm>


More information about the jmh-dev mailing list