jmx-dev RFR: 8368527: JMX: Add an MXBeans method to query GC CPU time

Bernd duke at openjdk.org
Tue Sep 30 09:22:20 UTC 2025


On Tue, 30 Sep 2025 09:06:48 GMT, Jonas Norlinder <duke at openjdk.org> wrote:

>> src/java.management/share/classes/java/lang/management/MemoryMXBean.java line 279:
>> 
>>> 277:      * deduplication thread (if enabled). This method returns
>>> 278:      * {@code -1} if the platform does not support this operation
>>> 279:      * or if called during shutdown.
>> 
>> Can we explicitly state here that this is concurrent time as well as worker time spent during pauses but not accumulated pause times?
>
> Just want to ensure that I read this correct, please correct any mistake below:
> 
> * concurrent time = `CPU time`
> * accumulate times = `wall-clock time`
> 
> Is your suggestion that we should clarify that the method may only account for `CPU time` and not `wall-clock time` during pauses?

It’s mostly about making clear it’s Not a measurement for pause time (no matter if wall clock or per thread), dont know how to best Formulate it. I think it’s needed sind typically pause times have been associated with GRC thread Timings. Maybe something like „the accounted CPU time can be spent concurrently with application threads or during pauses“ or something Like that?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27537#discussion_r2390505263


More information about the jmx-dev mailing list