RFR: 8342818: Implement CPU Time Profiling for JFR
Johannes Bechberger
jbechberger at openjdk.org
Tue Oct 29 11:00:24 UTC 2024
On Fri, 27 Sep 2024 17:16:51 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:
> Is the difference that you don't drop events? Otherwise, they seem similar.
Yes. We cannot drop samples, else we have sampling bias.
We use the period because this is the only thing that we can properly set with a cpu-time sampler. So the period is just lower-bounded by something that we compute from the `maxRate`.
Should I instead use the `throttle` setting and just let the behaviour differ as explained before?
> Maybe we should call the field samplingPeriod? Hmm, need to think about this.
Sounds good.
> I also wonder if we should use the event thread as sampledThread. The plan is to move over to cooperative sampling, so the event will be emitted in the thread that was sampled. This is also true for ExecutionSample. We may need to keep the field name for compatibility reasons for that event, or have both.
I would keep the sampledThread different for the mentioned compatibility reasons. But duplicating the thread into the eventThread is probably best for the future when it will be different without much additional cost.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20752#issuecomment-2380003980
PR Comment: https://git.openjdk.org/jdk/pull/20752#issuecomment-2419069480
More information about the hotspot-dev
mailing list