RFR: 8342818: Implement CPU Time Profiling for JFR
Jaroslav Bachorik
jbachorik at openjdk.org
Tue Oct 29 11:00:25 UTC 2024
On Tue, 10 Sep 2024 13:52:45 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:
>> Why are events with stack trace = null emitted? Isn't CPUTimeExecutionSampleLoss sufficient?
>
> This happens when the JVM is unable to walk a specific stack trace, but the queues are not full, and when the JVM is unable to resolve `Method` pointers.
>
> The main idea behind it is that we still record that the thread runs on the CPU at this point in time; we just don't have any proper information on the stack trace. Only knowing that a thread run is still valuable information.
Indeed. This is important for getting the correct distribution. Since we are sampling per thread cpu time, having one global 'event loss' is suboptimal as it is not possible to easily assign the lost events to threads proportionally.
But because keeping the event loss per thread would be too expensive we settled for this solution. OTOH, for unwalkable samples we can 'cheaply' record them and maintain the distribution.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r1752151261
More information about the hotspot-dev
mailing list