RFR: 8342818: Implement CPU Time Profiling for JFR [v2]
Johannes Bechberger
jbechberger at openjdk.org
Wed Oct 30 18:11:00 UTC 2024
On Wed, 30 Oct 2024 07:32:51 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:
>> src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 57:
>>
>>> 55: static bool thread_state_in_java(JavaThread* thread) {
>>> 56: assert(thread != nullptr, "invariant");
>>> 57: switch(thread->thread_state()) {
>>
>> Why a full switch when only two states are of interest?
>
> Similarity to the other sampler.
And it's far easier to read.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r1823152471
More information about the hotspot-dev
mailing list