RFR: 8274178: G1: Occupancy value in IHOP logging and JFR event is inaccurate [v4]
Albert Mingkun Yang
ayang at openjdk.org
Thu Nov 13 10:40:29 UTC 2025
On Thu, 13 Nov 2025 09:45:08 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> Because this is what the method does. Send a JFR/trace event. I think the new name is more concise about that. Similar to the other name that is now called `print_log` to explicitly call out that we are printing the log message.
>>
>> In Hotspot, a "trace event" or just "event" is always a JFR event as opposed to printing log output.
>>
>> I can rename it back if you think the old name was more concise. Maybe it is better wrt to the `G1NewTracer` used here.
>
> I.e. the identifier `jfr` is throughout the GC code (from quick searching) always associated to `events` or the `tracer`. We already use names like `*JFRTracer*` (in G1) or `_jfr_tracer` (in ZGC) to (apparently to me) make it clear that the related code is about jfr.
>
> To me the term tracing is too generic, whenever I read such a name I always need to think about what kind of tracing for what is actually meant, as opposed to printing a (text) log message. With something like "jfr" in the name it is very clear that this is not something generic.
> Because this is what the method does.
But what don't/can't know that info in this context.
I'd slightly leaned towards the old name, as there is no jfr in the current context. (Ofc, that's a diff story if `G1NewTracer` is renamed to `G1NewJfrTracer`, or sth.) Very subjective; up to you.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28175#discussion_r2522877456
More information about the hotspot-gc-dev
mailing list