RFR: CODETOOLS-7903560: JMH: async profiler reports only the last fork result [v4]

Aleksey Shipilev shade at openjdk.org
Tue Feb 20 15:59:08 UTC 2024


On Tue, 20 Feb 2024 07:47:26 GMT, Jonas Konrad <duke at openjdk.org> wrote:

>> Without this change, async-profiler would write the same result in each fork, overwriting the previous result.
>> 
>> This patch introduces a new "FileResult" class that collects the output paths of each benchmark. In `afterTrial`, the output files are moved to a new path that includes the pid (fork number would be an alternative but it's not as easily available).
>> 
>> At the moment, results of different runs are not coalesced. But with these changes, it would be easy to coalesce at least the results of the "collapsed" output mode. I plan to do this in another PR.
>
> Jonas Konrad has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix test

Generally looks good.

Infrastructure updates landed in current master, please merge from it to get cleaner GHA runs.

I also suggest we pull in async-profiler to Linux runner and run the new tests with it. Add this to `.github/workflows/pre-integration.yml` after `Set up perf (Linux)` step:



    - name: Set up async-profiler (Linux)
      run: |
        curl -L https://github.com/async-profiler/async-profiler/releases/download/v3.0/async-profiler-3.0-linux-x64.tar.gz | tar xzf -
        echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/async-profiler-3.0-linux-x64/lib/" >> $GITHUB_ENV
      if: (runner.os == 'Linux')


I'll approve once GHA is green with enabled async-profiler.

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

PR Review: https://git.openjdk.org/jmh/pull/121#pullrequestreview-1890822126


More information about the jmh-dev mailing list