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

Aleksey Shipilev shade at openjdk.org
Tue Apr 23 11:55:41 UTC 2024


On Fri, 19 Apr 2024 18:28:51 GMT, Filipp Zhinkin <fzhinkin at openjdk.org> wrote:

>>> > Could you add any hints for an early adopter on how to check it from a development branch?
>>> 
>>> Look at PR body, "Reviewing", there is a section how to fetch the dev-branch.
>> 
>> Thank you for the hint, Alexey. 
>> My question was mostly about the prerequisites required to use the xctrace profiling feature:
>> - do I need to install any prerequisites except XCode?
>> - shall I create some specific instruments.app profile? 
>> 
>> Extra: can Instruments' CPU counters facility be used to profile cache misses and so on?
>
> @tsitelov, first of all, thanks for your interest in the profiler!
> 
>> My question was mostly about the prerequisites required to use the xctrace profiling feature:
>> 
>> - do I need to install any prerequisites except XCode?
>> - shall I create some specific instruments.app profile?
> 
> `Xcode` is the only prerequisite. You can use either `Time Profiler` (it will be used by default) or `CPU Profiler` templates without configuring anything in the `Instruments.app`. A template name could be specified using `template` parameter.
> 
>> Extra: can Instruments' CPU counters facility be used to profile cache misses and so on?
> 
> In that case you have to configure and save a new template in the `Instruments.app` and then supply its name or a path to it to xctraceprof's `template` parameter. The only caveat is that the same PMU counter should be configured as both a PMI trigger and a sampled event in Instrument's recording settings.

@fzhinkin, as per [bot's comment](https://github.com/openjdk/jmh/pull/130#issuecomment-2002026686) if you say `/integrate`, you would be able to integrate.

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

PR Comment: https://git.openjdk.org/jmh/pull/130#issuecomment-2072098650


More information about the jmh-dev mailing list