RFR: 8369449: Spec: introduce new JVMTI function GetTotalGCCpuTime [v3]

Serguei Spitsyn sspitsyn at openjdk.org
Sat Oct 18 00:56:25 UTC 2025


> With [JDK-8359110](https://bugs.openjdk.org/browse/JDK-8359110) a framework to measure GC CPU time was introduced.
> It will be exposed in JMX as `MemoryMXBean.getTotalGcCpuTime()`. There is also interest to get the same performance data from JVMTI.
> The following API's are being added with this enhancement:
> 
> Introduce:
>  - new capability: `can_get_gc_cpu_time`
>  - new JVMTI functions:
>     - `jvmtiError GetGCCpuTimerInfo(jvmtiEnv* env, jvmtiTimerInfo* info_ptr)`
>     - `jvmtiError GetTotalGCCpuTime(jvmtiEnv* env, jlong* nanos_ptr)`
> 
> The related CSR will be created shortly.
> 
> Testing:
>  - TBD: Mach5 tiers 1-6

Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:

  fix a typo in GetGCCpuTimerInfo: long => jlong

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/27879/files
  - new: https://git.openjdk.org/jdk/pull/27879/files/1fef0d71..d816a56d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=27879&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27879&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/27879.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27879/head:pull/27879

PR: https://git.openjdk.org/jdk/pull/27879


More information about the serviceability-dev mailing list