> Here is another, hopefully, closer to the final iteration of NMT benchmarking 
> mechanism.
> 
> To use, you first need to record the pattern of operations, ex:
> 
> `./build/macosx-aarch64-server-release/xcode/build/jdk/bin/java 
> -XX:+UnlockDiagnosticVMOptions -XX:NMTRecordMemoryAllocations=0x7FFFFFFF -jar 
> build/macosx-aarch64-server-release/images/jdk/demo/jfc/J2Ddemo/J2Ddemo.jar`
> 
> This will run the target app, and log all the allocations in chronological 
> order. This will produce a few files:
> - hs_nmt_pid22770_allocs_record.log (is the chronological record of the the 
> desired operations)
> - hs_nmt_pid22770_info_record.log (is the record of default NMT memory 
> overhead and the NMT state)
> - hs_nmt_pid22770_threads_record.log (is the record of thread names that can 
> be retrieved later when processing)
> 
> Now you can use those recording to actually benchmark your proposed changes, 
> ex:
> 
> `./build/macosx-aarch64-server-release/xcode/build/jdk/bin/java 
> -XX:+UnlockDiagnosticVMOptions -XX:NMTBenchmarkRecordedPID=22770 
> -XX:NMTBenchmarkRecordedLoops=10`
> 
> Which will produce yet another file:
> 
> - hs_nmt_pid23527_benchmark.log
> 
> that contains the details of the session, which can be further processed and 
> analyzed by a tool, such as the one in jdk/src/utils/nmt, however, if you are 
> looking just for one performance number look for `time:2744190[ns] 
> [samples:115263]` in the output.
> 
> The total time for this particular run is 2,744,190 nanosecond or ~2.7 
> seconds, which you can use to compare `before` and `after` your change.

Gerard Ziemski has updated the pull request incrementally with one additional 
commit since the last revision:

  skip if not using

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/23115/files
  - new: https://git.openjdk.org/jdk/pull/23115/files/a83389ab..a925e3d5

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=23115&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23115&range=00-01

  Stats: 15 lines in 1 file changed: 6 ins; 2 del; 7 mod
  Patch: https://git.openjdk.org/jdk/pull/23115.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23115/head:pull/23115

PR: https://git.openjdk.org/jdk/pull/23115

Reply via email to