RFR: 8354555: Add generic JFR events for TaskTerminator [v3]

Xiaolong Peng xpeng at openjdk.org
Fri May 23 06:09:38 UTC 2025


> The purpose of the PR is to add generic JFR events for TaskTerminator to track the attempts and timings that GC threads have tried to terminate GC tasks.
> 
> Today only G1 emits JFR event with name `Termination` from [G1ParEvacuateFollowersClosure](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/g1/g1YoungCollector.cpp#L555-L563), all other garbage collectors don't emit any JFR event for the termination attempt at all. 
> 
> By adding this, it gives performance engineers the visibility to the termination attempts and  termination time when GC threads trying to finish GC tasks, we could build tool to analyze the jfr events to determine if there is potential data structure issue in application code, e.g. very large LinkedList or LinkedBlockingQueue.
> 
> ### Test
> - [x] Test and verify the termination events in jfr for G1, Shenandoah and Parallel GC.
> - [x] Tier 1
> - [x] Tier 2

Xiaolong Peng has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 27 commits:

 - Merge branch 'master' into JDK-8354555
 - Patch to fix the PR concerns
 - Emit exact same events for G1 as G1 is emitting today from G1EvacuateRegionsBaseTask and G1STWRefProcProxyTask
 - Add include "workerThread.hpp"
 - Touch up
 - Move TERMINATION_EVENT_NAME_PREFIX_ASSERT to taskTerminator.cpp
 - Fix ident
 - termination_event_name must have prefix "Termination"
 - Override termination event name for remark
 - Address PR comments
 - ... and 17 more: https://git.openjdk.org/jdk/compare/9d9e41f5...5ab1c5fc

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

Changes: https://git.openjdk.org/jdk/pull/24676/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24676&range=02
  Stats: 86 lines in 9 files changed: 65 ins; 7 del; 14 mod
  Patch: https://git.openjdk.org/jdk/pull/24676.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24676/head:pull/24676

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


More information about the hotspot-dev mailing list