RFR: 8278282: G1: Log basic statistics of evacuation failure

Hamlin Li mli at openjdk.java.net
Fri Dec 10 10:45:16 UTC 2021


On Fri, 10 Dec 2021 09:42:47 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

> I thought we agreed on having more things on debug level and using "Evacuation Failure Regions" for now (until we have more than one type of retained regions), like this:

Thanks Stefan. I misunderstood, will update it as "Evacuation Failure Regions".

> 
> ```
> [10.917s][debug][gc,phases] GC(0)       Restore Retained Regions (ms): ...
> [10.917s][debug][gc,phases] GC(0)         Evacuation Failed Regions:              ...
> [10.917s][debug][gc,phases] GC(0)         Prepare Retained Object Refs (ms): ...
> [10.917s][debug][gc,phases] GC(0)         Reformat Retained Regions (ms): ...
> [10.917s][debug][gc,phases] GC(0)           Retained Objects:              ...
> [10.917s][trace][gc,phases] GC(0)           Retained Bytes:                ...
> [10.917s][debug][gc,phases] GC(0)         Reclaim Memory (ms):           ...
> [10.917s][trace][gc,phases] GC(0)           Used [Native] Memory:          ...
> ```
> 
Currently, I implement it by add following phases:

    RestoreRetainedRegions,
    RestoreRetainedRegionsPrepare,
    RestoreRetainedRegionsReformat,
    RestoreRetainedRegionsReclaim,

and, add `RestoreRetainedRegionsObjects` and `RestoreRetainedRegionsBytes` as work item of `RestoreRetainedRegionsReformat` phase, add `RestoreRetainedRegionsReclaimUsedMemory` as work item of `RestoreRetainedRegionsReclaim`, add `RestoreRetainedRegionsNum` as work item of `RestoreRetainedRegions` phase.

I tried to put a phase and work items under it in different log level, but seems the current phase time framework only support to log phase and its work items at the same log level. Maybe I missed something in the code, let me do some further investigation.

> Possibly also put the regions count last, to keep the timings at the top.

I tried this too. But seems the current phase time framework only support to put the WorkItems of a phase close to its phase, rather than separate them with other phases, I will investigate it further.

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

PR: https://git.openjdk.java.net/jdk/pull/6763



More information about the hotspot-gc-dev mailing list