RFR: 7903722: JMH: Add xctrace-based perfnorm profiler for macOS [v2]

Filipp Zhinkin fzhinkin at openjdk.org
Mon Sep 23 22:02:49 UTC 2024


On Mon, 23 Sep 2024 13:39:30 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Filipp Zhinkin has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 16 additional commits since the last revision:
>> 
>>  - Merge branch 'master' into xctracenorm-prof
>>  - 7903722: Use default template instead of generating a package
>>  - 7903722: Add extra tests
>>  - 7903722: Scan all possible KPEP file locations
>>  - 7903722: Serialize xctrace tests execution
>>  - 7903722: simplified code, added missing docs, supported branch events
>>  - 7903722: Improve events preprocessing
>>  - 7903722: Refactor KPEP database loading
>>  - 7903722: compute AS Arm64 instructions density metrics
>>  - 7903722: check if all listed events could be sampled simultaneously
>>  - ... and 6 more: https://git.openjdk.org/jmh/compare/cc76a779...5a112315
>
> jmh-core/src/main/java/org/openjdk/jmh/profile/XCTraceNormProfiler.java line 153:
> 
>> 151:                         "\" was not found in the trace results."));
>> 152:         if (tableDesc.getPmcEvents().isEmpty() && tableDesc.getTriggerType() == XCTraceTableHandler.TriggerType.TIME) {
>> 153:             throw new IllegalStateException("Results does not contain any events.");
> 
> `ProfilerException`?

Effectively, it'll be thrown from `afterTrial`, and `afterTrial` has no exceptions in its signature, so I'm not sure if it's worth throwing `ProfilerException` only to catch it, wrap it into some `RuntimeException`-subclass and rethrow it.

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

PR Review Comment: https://git.openjdk.org/jmh/pull/131#discussion_r1772282434


More information about the jmh-dev mailing list