RFR (S/M): 8014078: G1: improve remembered set summary information by providing per region type information

Thomas Schatzl thomas.schatzl at oracle.com
Tue May 28 08:26:15 UTC 2013

Hi all,

  could I get some reviews for the following change? It improves the
remembered set summary information available with -XX:
+G1SummarizeRSetStats by adding memory size and occupancy summaries
broken down by region type (young, humonguous, free, other).


Note that this webrev is based on 8013895; I provided a full changeset
including 8013895 at



jprt, jtreg tests

About the change:

- the output of G1SummarizeRSetStats now looks as follows (for

After GC RS summary

 Concurrent RS processed 15299 cards
  Of 64 completed buffers:
           64 (100.0%) by concurrent RS threads.
            0 (  0.0%) by mutator threads.
  Concurrent RS threads times (s)
  Concurrent sampling threads times (s)
  Total heap region rem set sizes = 512K.  Max = 13K.
>>>>      17K (  3.4%) by 7 Young regions
>>>>       7K (  1.4%) by 3 Humonguous regions
>>>>     157K ( 30.6%) by 64 Free regions
>>>>     330K ( 64.6%) by 44 Other regions
  Static structures = 1K, free_lists = 254K.
    277592 occupied cards represented.
>>>>        0 (  0.0%) entries by 7 Young regions
>>>>        2 (  0.0%) entries by 3 Humonguous regions
>>>>        0 (  0.0%) entries by 64 Free regions
>>>>   277590 (100.0%) entries by 44 Other regions
    Max size region =
3:(O)[0x00000000f0900000,0x00000000f0a00000,0x00000000f0a00000], size =
14K, occupied = 25K.
    Did 0 coarsenings.

Notice the breakdown of memory size and card occupancy by region type
(marked with >>>> here).

"Young" regions include all types of young regions (i.e. survivor) as
survivor does not have a meaning for g1 outside of a gc.
"Humonguous" and "Free" are self-explaining. "Other" regions include
everything else.

- added a new flag G1SummarizeRSetStatsTime that is used to control the
time, i.e. before/after gc, when the periodicaly summaries are printed.
This integer is treated as a bitset, where a set first bit indicates a
request to print a summary after gc, the second bit a request to print a
summary before gc.

The alternative (which I'd like more) would be to change
G1SummarizeRSetStats to act like this new flag to avoid introducing a
new flag; however I'm hesitant to change this as G1SummarizeRSetStats is
a publicly available flag (although diagnostic).

- cleanup of the test cases: a large part of the code base for this CR
reuses utility methods from 8013895, so I went ahead and factored out
common code into a separate file that both the tests for 801385 and this
CR use.


More information about the hotspot-gc-dev mailing list