Currently, the parallel marking phase in G1 only marks objects on
their bitmap and not sum up the amount of live bytes per region. This
is done serially in a subsequent phase after remark and before
cleanup. This serial iteration over the heap turns out to be a
performance bottleneck on medium to large MPs, when the application
live size is non-trivial. This accounting phase should be
Given that this is an RFE I'm going to go ahead and retarget this to hs23.
Non-trivial change we never quite got done on time given that we concentrated on more important ones (ref processing during GCs, reliability fixes, etc.). We'd like to defer it to hs23.
There are a couple of ways to achieving this. The first one is to
simply parallelize the accounting phase and still execute it between
remark and cleanup. The second one is to scrap the separate accounting
phase and piggy-back it on the marking phase (use a data structure
local to each GC thread to account for all the objects that GC thread
marked and sum up the thread-local data structure in the end). I favor
the latter, as I've always thought the whole point of G1 is to avoid