RFR: 8366035: Simplify CPUTimeCounters::publish_gc_total_cpu_time

Guanqiang Han ghan at openjdk.org
Mon Aug 25 08:16:07 UTC 2025


This change refactors CPUTimeCounters::publish_gc_total_cpu_time() to use Atomic::xchg instead of a CAS (cmpxchg) loop.
Please review it. Thanks

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

Commit messages:
 - 8366035: Simplify CPUTimeCounters::publish_gc_total_cpu_time

Changes: https://git.openjdk.org/jdk/pull/26921/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26921&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8366035
  Stats: 9 lines in 1 file changed: 0 ins; 7 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/26921.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26921/head:pull/26921

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


More information about the hotspot-runtime-dev mailing list