RFR: 8342818: Implement CPU Time Profiling for JFR [v4]

Johannes Bechberger jbechberger at openjdk.org
Wed Nov 6 13:51:50 UTC 2024


On Thu, 31 Oct 2024 12:03:18 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:

>> Perhaps even more interesting is that I got this when running out-of-the-box with:
>> 
>> XX:StartFlightRecording:settings=profile.jfc
>> 
>> // profile.jfc
>> 
>>     <event name="jdk.CPUTimeSample">
>>       <setting name="enabled" control="method-sampling-enabled">false</setting>
>>       <setting name="throttle">10ms</setting>
>>     </event>
>>     
>> This indicates that the event is turned on, despite "enabled" being false. Is there a bug in the control / enable setting mechanism?
>
> That is both interesting (and worrying). I'm going to write a test for the latter issue.

> NoHandleMark will not work with with continuations. Please see how we do it in JfrStackTrace::record()

Thank you.

> This indicates that the event is turned on, despite "enabled" being false. Is there a bug in the control / enable setting mechanism?

I was unable to reproduce the issue but I removed the control attribute because I don't think that users would expect CPU sampling to be enabled when they set `method-sampling-enabled`. This hopefully solves your issue.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r1831049378


More information about the hotspot-dev mailing list