RFR (S/M): 8184348: Merge G1ConcurrentMark::par_mark() and G1ConcurrentMark::grayRoot()

Thomas Schatzl thomas.schatzl at oracle.com
Fri Jul 14 11:19:18 UTC 2017

Hi all,

  could I get reviews for this refactoring change that
merges G1ConcurrentMark::par_mark() and G1ConcurrentMark::grayRoot()
into one single method G1ConcurrentMark::mark_in_next_bitmap() that
factors out all code that is otherwise done multiple times separately.

I.e. checking that the given address is smaller than nTAMS, asserts,
dirty card mark check and the actual card mark into a single file that
is then called everywhere. I also removed some superfluous asserts that
are subsumed in previous asserts or methods used.

It can also be seen as start of cleaning up G1ConcurrentMark.

I intentionally left both G1ParCopyHelper::mark_object()
and G1ParCopyHelper::mark_forwarded_object(), although they look like
they could be merged. First, it does not seem worthwhile because their
semantics and asserts seem to be separate enough, second, some probably
not-so-distant future change will need them separate again :P
If you really want I could do that nevertheless.

Note that this change depends on the recent G1CMBitMap cleanup in JDK-
8184346 (but not on the move of G1CMBitMap into separate files that is
referenced in the webrev - the file touched just happens to be in the
mq stack). 

jprt, some additional local hotspot test runs


More information about the hotspot-gc-dev mailing list