RFR: 7903696: JMH: Add xctrace-based perfasm profiler for macOS [v3]

Filipp Zhinkin fzhinkin at openjdk.org
Mon Apr 22 20:05:43 UTC 2024


On Fri, 19 Apr 2024 17:33:44 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Filipp Zhinkin has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - 7903696: Removed an option unsupported by older xctrace version
>>  - 7903696: Support legacy backtrace format
>>  - 7903696: Detect xctrace using xcode-select
>
> jmh-core/src/main/java/org/openjdk/jmh/profile/XCTraceTableOfContentsHandler.java line 68:
> 
>> 66:         } else if (schema.equals(ProfilingTableType.COUNTERS_PROFILE.tableName)) {
>> 67:             parseCountersProfile(attributes);
>> 68:         }
> 
> Optional: You can use switch over Strings here?

It won't work here as loading the enum's field is not a compile-time const expression.

And converting a `schema` value into a `ProfilingTableType` and then switching over it seems to be an overkill here (but if you disagree, I can rewrite it).

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

PR Review Comment: https://git.openjdk.org/jmh/pull/130#discussion_r1575298199


More information about the jmh-dev mailing list