RFR: Simplify and optimize ShenandoahHeap::requires_marking()

Roman Kennke rkennke at redhat.com
Wed Jan 10 22:04:20 UTC 2018


When I implemented partial-GC, I complicated 
ShenandoahHeap::requires_marking(). This method basically decides which 
oops on SATB queues to keep and which to discard when filtering SATB 
queues (before processing them). The idea behind this was that we need 
all oops on the queues for partial-GC, but only not-yet-marked oops 
during concurrent marking.

Work on traversal GC lead to a similar problem, and then it occurred to 
me that we don't need to complicate that code at all: during partial GC, 
we never use the bitmap. Simply returning !is_marked_next(obj) does the 
same as return true, and is probably. This should restore a little bit 
of performance of the regular Shenandoah mode, at the potential cost of 
a little bit of performance for partial GC. However, I am not even sure 
that this code is performance critical at all. I couldn't see any 
performance changes.

http://cr.openjdk.java.net/~rkennke/req-marking/webrev.00/

Testing: hotspot_gc_shenandoah

Ok to push?

Roman


More information about the shenandoah-dev mailing list