RFR: 8315149: Add hsperf counters for CPU time of internal GC threads [v27]
Jonathan Joo
jjoo at openjdk.org
Thu Oct 12 23:32:24 UTC 2023
On Wed, 11 Oct 2023 23:23:11 GMT, Man Cao <manc at openjdk.org> wrote:
>> Jonathan Joo has updated the pull request incrementally with one additional commit since the last revision:
>>
>> add comment and change if defined to ifdef
>
> src/hotspot/share/gc/shared/collectedHeap.cpp line 298:
>
>> 296: NOT_PRODUCT(_promotion_failure_alot_gc_number = 0;)
>> 297:
>> 298: if (UsePerfData && os::is_thread_cpu_time_supported()) {
>
> This condition should be a nested if inside `if (UsePerfData)`:
>
>
> if (os::is_thread_cpu_time_supported()) {
> _total_cpu_time = ...;
> _perf_parallel_worker_threads_cpu_time = ...;
> }
>
> Otherwise `_perf_gc_cause` and `_perf_gc_lastcause` could be broken.
Ah yes, good catch!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15082#discussion_r1357552757
More information about the serviceability-dev
mailing list