RFR: Embed traversal_set and root_regions into ShenandoahTraversalGC to avoid derefs
Roman Kennke
rkennke at redhat.com
Wed Jun 27 15:34:03 UTC 2018
I've noticed some unnecessary derefs in hot marking/traversal loops to
get to stuff like cset, mark-bitmap and traversal set.
Here I'm proposing to embed the traversal_set and root_regions into
ShenandoahTraversalGC. This helps to avoid some of those derefs. I
changed all access to it to use the embedded object directly inside
ShTraversalGC, and only hand it out as reference. Only exception is the
ShHeapRegionSetIterator, which still converts it to pointer internally,
because we can't reset a reference.
The patch also makes ShHeap and task-queues const in ShTraversalGC.
http://cr.openjdk.java.net/~rkennke/traversal-embed-stuff/webrev.00/
Testing: tier3_gc_shenandoah
I'd like to take this even further. What seems hotter than traversal_set
and root_regions is the cset-array, followed by the mark bitmap.
However, we can't easily embed those because it's shared between
traversal and conc-mark, and, even worse, between the 3 phases
conc-mark, evac and update-refs. Embedding is not the only solution too:
we can probably deref it before, and pass it up the call stack.
Mark-bitmaps is even trickier in conc-mark because there we're swapping
the bitmaps. We need to think this through carefully.
Ok to push the proposed patch?
Roman
More information about the shenandoah-dev
mailing list