RFR: 8167679: G1 phase logging is messy

Stefan Johansson stefan.johansson at oracle.com
Tue Oct 25 10:22:12 UTC 2016


Hi Erik,

On 2016-10-14 16:00, Erik Helin wrote:
> Hi all,
>
> this patch re-organizes the slightly messy phase logging for G1. Right
> now there are a couple of "top-level" phases at gc+phases=info level:
> - Evacuate Collection Set
> - Code Roots
> - Merge Per-Thread States
> - Clear card table
> - Free Collection Set
> - Other
> (-Root Region Scan Waiting if it takes any time)
>
> There is no reasoning for showing exactly these phases, they have more or
> less just been added over the years. The "Other" phase includes multiple
> miscellanous phases as well as unknown/unmeasured time. This patch
> introduces four phases on the gc+phases=info level:
> - Pre Evacuate Collectinon Set
> - Evacuate Collection Set
> - Post Evacuate Collection Set
> - Other
>
> where "Other" now is only unknown/unmeasured time. I have organized the
> phases at gc+phases=debug level so they are now in "execution order":
> - Pre Evacuate Collection Set
>    - Choose Collection Set
>    - Humongous Register
> - Evacuate Collection Set
>    - Ext Root Scanning
>    - Update RS
>    - Scan RS
>    - Code Root Scanning
>    - Object Copy
>    - Termination
> - Post Evacuate Collection Set
>    - Code Roots Fixup
>    - Preserve CM Refs
>    - Reference Processing
>    - Clear Card Table
>    - Reference Enqueuing
>    - Code Roots Purge
>    - Redirty Cards
>    - Free Collection Set
>    - Humongous Reclaim
>    - Expand Heap After Collection
> - Other
>
> The "Code Roots" phase at info level was removed since it doesn't make
> sense to sum "Code Roots Fixup" and "Code Roots Purge", that shouldn't
> have been done to begin with.
I really like the result of this change, I think this is a great 
improvement.
> As for the code, I removed a few macros and replaced them with just
> normal functions.
>
> Webrev:
> http://cr.openjdk.java.net/~ehelin/8167679/00/
Looks good in general, a few minor things:
* I think we can skip the helper log_line, and instead used log_info, 
log_debug in similar to what is done for trace_line(size_t).
* Make it easier to see what's being logged by changing *_line(double) 
to *_time and trace_line(size_t) to trace_count().
* The timing _recorded_clear_claimed_marks_time_ms is not added to 
sum_ms in print_post_evacuate_collection_set.

Thanks,
Stefan

> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8167679
>
> Testing:
> - JPRT
>
> Thanks,
> Erik




More information about the hotspot-gc-dev mailing list