RFR: 7903696: JMH: Add xctrace-based perfasm profiler for macOS [v3]
Aleksey Shipilev
shade at openjdk.org
Tue Apr 23 09:12:40 UTC 2024
On Mon, 22 Apr 2024 20:03:04 GMT, Filipp Zhinkin <fzhinkin at openjdk.org> wrote:
>> 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).
OK, that's fine. Do we need `} else {` with some exception throwing for exhaustiveness?
-------------
PR Review Comment: https://git.openjdk.org/jmh/pull/130#discussion_r1575907663
More information about the jmh-dev
mailing list