RFR: 8349476: G1: Regularly print CPU usage by thread type
Thomas Schatzl
tschatzl at openjdk.org
Wed Feb 12 17:53:16 UTC 2025
On Wed, 12 Feb 2025 11:52:50 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> please review this change to print total cpu usage per worker thread group every gc (with `gc+cpu=debug`) to have a better overview about which threads are taking how much CPU.
>
> I considered merging with the gc worker perfcounter update close by, but the opportunity to share code is very little, and the resulting code would be riddled with checking whether the perf counters should be updated or not.
>
> I.e. the only shared code would be the closure with a one-liner calling `os::thread_cpu_time()`; most other code would be different, e.g. determining whether to update the perf counters or not, the actual log messages etc.
>
> Tell me if you think I should try harder to do so.
>
> Testing: gha
>
> Thanks,
> Thomas
Retracting, I think there is too little gain here, and the change isn't that nice either.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23585#issuecomment-2654449922
More information about the hotspot-gc-dev
mailing list