RFR: 8361716 : GCTraceCPUTime may report incorrect times during high load from JNI code [v4]
Jonas Norlinder
jnorlinder at openjdk.org
Thu Dec 18 09:08:44 UTC 2025
On Wed, 17 Dec 2025 07:53:28 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
>> Jonas Norlinder has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use portable type
>
> A couple of more comments.
Huge thanks to @kstefanj that found that values could appear as <0 where GC runs very frequent. I tracked the error down due to the technical limitations of how we can get system time on Linux for a thread. Since it requires two calls and taking the difference (total - user), there is a risk that these are out of sync. This can be resolved by using getrusage which values are in sync.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28824#issuecomment-3669221571
More information about the hotspot-gc-dev
mailing list