RFR: 8372704: ThreadMXBean.getThreadUserTime may return total time

David Holmes dholmes at openjdk.org
Fri Nov 28 02:50:48 UTC 2025


On Thu, 27 Nov 2025 21:55:10 GMT, Jonas Norlinder <jnorlinder at openjdk.org> wrote:

> getThreadUserTime will return total (system + user) time if called with e.g. ManagementFactory.getThreadMXBean().getThreadUserTime(Thread.currentThread().threadId()).
> 
> The specification for this methods states that only user-level CPU time would ever be returned on success.

Good catch on the bug introduced by JDK-8303242! Looks good.

Copyright year needs updating. Thanks

-------------

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28545#pullrequestreview-3517316099


More information about the serviceability-dev mailing list