RFR: 8307378: Allow collectors to provide specific values for GC notifications' actions

William Kemper wkemper at openjdk.org
Thu May 4 14:52:15 UTC 2023


On Thu, 4 May 2023 13:48:30 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> At the end of a GC pause, a `GarbageCollectionNotificationInfo` may be emitted. The notification has a `gcAction` field which presently originates from the field `_gc_end_message` in `GCMemoryManager`. Concurrent collectors such as Shenandoah, ZGC and G1 may have more (brief) pauses in their cycle than they have memory managers. This makes it difficult for gc notification listeners to determine the phase of the cycle that emitted the notification. We are proposing a change to allow collectors to define specific values for the `gcAction` to make it easier for notification listeners to classify the gc phase responsible for the notification.
>
> The proposed patch introduces two ways to inject these messages, which makes the code slightly harder to follow. I wonder if it wouldn't be easier if we just had one, a bit more flexible, way to provide the message. What do you think about something like this:
> https://github.com/stefank/jdk/commit/52e9fe84c2bc14b21824068d71419d0e1f0796c1

@stefank - Unifying the code path looks great to me. I was just trying to minimize the changes. Should I cherry pick your commit into the branch for the PR?

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

PR Comment: https://git.openjdk.org/jdk/pull/13785#issuecomment-1534919498


More information about the hotspot-dev mailing list