RFR: 8342818: Implement CPU Time Profiling for JFR [v4]
Markus Grönlund
mgronlun at openjdk.org
Wed Oct 30 21:48:32 UTC 2024
On Wed, 30 Oct 2024 21:22:09 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:
>> Shouldn't the event have a stackTrace setting and the setting be set to true in default.jfc, similar to ObjectAlllocationSample?
>>
>> metadata.xml:
>> <Event name="ObjectAllocationSample" thread="true" stackTrace="true" startTime="false" throttle="true">
>> <Field type="Class" name="objectClass" label="Object Class" />
>> <Field type="long" contentType="bytes" name="weight" />
>> </Event>
>>
>> default.jfc:
>> <event name="jdk.ObjectAllocationSample">
>> <setting name="enabled">true</setting>
>> <setting name="throttle">150/s</setting>
>> <setting name="stackTrace">true</setting>
>> </event>
>>
>> OldObjectSample also works that way, but it has "cutoff" instead of "throttle".
>
> This would also be an option.
> The problem is, is that `eventType.hasStackTrace()` checks for the existence of a field called `stackTrace`, which CPUTimeSample events have. We could of course rename the field to something like `recordedStackTrace`, but I don't think that this is helpful.
Aha - so even if the event is not decorated with stackTrace=true in metadata.xml, it has an explicit field with the same name "StackTrace". Wonder why this should be handled differently from ExecutionSample?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r1823433881
More information about the hotspot-dev
mailing list