On Thu, 27 Nov 2025 21:55:10 GMT, Jonas Norlinder <[email protected]> 
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.

Well spotted. We had to make significant changes to this code in JDK 21 with 
JDK-8303242 and it seems to have crept in then.

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

Marked as reviewed by alanb (Reviewer).

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

Reply via email to