RFR: 8366970: CPUTimeUsage: Add comment about usage during VM exit
David Holmes
dholmes at openjdk.org
Mon Sep 8 07:15:12 UTC 2025
On Fri, 5 Sep 2025 10:06:32 GMT, Jonas Norlinder <duke at openjdk.org> wrote:
> Some of the methods in CPUTimeUsage make a query on the underlying threads. Calling those methods during VM exit is therefore unsafe. This PR adds a comment to provide clarification.
If the methods could be unsafe surely they should be checking for that, or else ensuring they are not used in unsafe contexts.
-------------
PR Review: https://git.openjdk.org/jdk/pull/27115#pullrequestreview-3195241431
More information about the hotspot-gc-dev
mailing list