RFR: 8307346 - Add missing gc+phases logging for ObjectCount(AfterGC) JFR event collection code

olivergillespie duke at openjdk.org
Wed May 3 10:11:22 UTC 2023


Add logging for the time taken to collect/report ObjectCount(AfterGC) event to Serial, Parallel and G1 full collectors, for parity with the G1 concurrent collector. This event can be *very* expensive to collect (single threaded STW full heap scan), so it's very important to show it clearly to the user.

Added output:

Serial

[7.976s][debug][gc,phases      ] GC(7) Trigger cleanups 0.002ms
[7.977s][debug][gc,phases      ] GC(7) Class Unloading 0.556ms
++ [7.977s][debug][gc,phases,start] GC(7) Report Object Count
++ [8.529s][debug][gc,phases      ] GC(7) Report Object Count 552.065ms
[8.529s][info ][gc,phases      ] GC(7) Phase 1: Mark live objects 1066.882ms
[8.529s][info ][gc,phases,start] GC(7) Phase 2: Compute new object addresses

Parallel

[5.786s][debug][gc,phases      ] GC(12) Trigger cleanups 0.002ms
[5.786s][debug][gc,phases      ] GC(12) Class Unloading 0.556ms
++ [5.786s][debug][gc,phases,start] GC(12) Report Object Count
++ [6.313s][debug][gc,phases      ] GC(12) Report Object Count 526.307ms
[6.313s][info ][gc,phases      ] GC(12) Marking Phase 889.900ms
[6.313s][info ][gc,phases,start] GC(12) Summary Phase

G1 Full

[3.922s][debug][gc,phases         ] GC(24) Trigger cleanups 0.002ms
[3.922s][debug][gc,phases         ] GC(24) Phase 1: Class Unloading and Cleanup 0.159ms
++ [3.922s][debug][gc,phases,start   ] GC(24) Report Object Count
++ [4.442s][debug][gc,phases         ] GC(24) Report Object Count 519.292ms
[4.442s][info ][gc,phases         ] GC(24) Phase 1: Mark live objects 653.209ms
[4.442s][info ][gc,phases,start   ] GC(24) Phase 2: Prepare compaction

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

Commit messages:
 - 8307346 - Add missing gc+phases logging for ObjectCount(AfterGC) JFR event collection code

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

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


More information about the hotspot-gc-dev mailing list