RFR: Traversal: Don't traverse new objects
Roman Kennke
rkennke at redhat.com
Wed Feb 21 19:13:08 UTC 2018
On Wed, Feb 21, 2018 at 7:09 PM, Aleksey Shipilev <shade at redhat.com> wrote:
> On 02/21/2018 06:34 PM, Roman Kennke wrote:
>> I removed the is_alloc_region() stuff in favour of checking r->tams()
>> < r->top() which tells me which region is an alloc region, so that we
>> can exclude them when trashing empty regions (alloc regions look empty
>> because no liveness data is accounted for). Notice that evac-regions
>> are not affected by this, because we *do* count evacuated objects/tlab
>> as live in evac regions.
>>
>> http://cr.openjdk.java.net/~rkennke/traversal-no-traverse-new/webrev.02
>
> *) Some terse comment is still needed aroudn next TAMS modification in FreeSet:
> http://mail.openjdk.java.net/pipermail/shenandoah-dev/2018-February/005095.html
Damn, forgot that again :-) I added commentary at the top of
shenandoahTraversalGC.cpp and in the particular spot in
shenandoahFreeSet.cpp.
> *) I would probably gave the name to the property:
>
> bool not_allocated = _heap->next_top_at_mark_start(r->bottom()) == r->top();
> if (r->is_humongous_start() && !r->has_live() && not_allocated) {
> // purge humongous
> } else if (!r->is_empty() && !r->has_live() && not_allocated) {
> // trash regular
> } else if (r->is_alloc_allowed()) {
> // add to free set
> }
>
> ...and optionally rephrased this as:
>
> bool not_allocated = _heap->next_top_at_mark_start(r->bottom()) == r->top();
> if (!r->has_live() && not_allocated) {
> if (r->is_humongous_start()) {
> // trash humongous
> } else {
> // trash regular
> }
> } else if (r->is_alloc_allowed()) {
> // add to free set
> }
>
I added the property. I did not re-phrase it because it's a different
logic and I could not (yet) convince myself that it's the same and
sane :-)
> *) Stray newline in shenandoahHeapRegion.hpp
> 239
Ok, fixed.
Differential:
http://cr.openjdk.java.net/~rkennke/traversal-no-traverse-new/webrev.03.diff
Full:
http://cr.openjdk.java.net/~rkennke/traversal-no-traverse-new/webrev.03
(give it some more seconds to upload)
Good?
Thanks for reviewing!
Roman
More information about the shenandoah-dev
mailing list