JDK-8307346 : Add missing gc+phases logging for ObjectCount(AfterGC) JFR event collection code
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 11,17,20,21
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-05-03
  • Updated: 2023-05-23
  • Resolved: 2023-05-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17 JDK 20 JDK 21
17.0.8Fixed 20.0.2Fixed 21 b22Fixed
Related Reports
Relates :  
Description
(Provisionally assigning this to myself, but Oli Gillespie [not an Author yet] would do the actual work)

Collecting the data for object count events can be expensive (seconds). The G1 concurrent collector has a debug timer for this phase, but Serial, Parallel and G1 full collector are missing this logging, which can cause confusion for the user who sees long pauses with no explanation. Other collectors (ZGC, Shenandoah, Epsilon) do not emit this event, so are not in scope.

The usual -Xlog:gc+phases=debug should show it.
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk20u/pull/79 Date: 2023-05-16 09:13:02 +0000
16-05-2023

Fix Request (17u, 20u) Clean backport to improve GC logging. Applies cleanly. New behavior is the same as for upstream.
16-05-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1344 Date: 2023-05-15 15:13:38 +0000
15-05-2023

Changeset: 3f1927a7 Author: Oli Gillespie <ogillesp@amazon.com> Committer: Aleksey Shipilev <shade@openjdk.org> Date: 2023-05-04 09:19:19 +0000 URL: https://git.openjdk.org/jdk/commit/3f1927a7f3a2914402a25335c47a5a8bdd5511a6
04-05-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/13772 Date: 2023-05-03 10:04:14 +0000
03-05-2023