RFR: 8254015: copy_to_survivor_space should use in-hand klass for scanning
Stefan Johansson
sjohanss at openjdk.java.net
Mon Oct 5 13:24:49 UTC 2020
On Mon, 5 Oct 2020 12:46:42 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this small change to G1 evacuation. When scanning the oops
> in an instance, the existing code calls obj->oop_iterate_backward(closure).
> That function gets the klass of obj and forwards to another function with
> the obj, closure, and the just obtained klass. But the caller of
> oop_iterate_backward has already obtained the klass for other reasons.
> Rather than refetching it (including dealing with
> UseCompressedClassPointers), change to use a new oop_iterate_backward
> overload taking the klass. This saves a small amount of work for non-array
> objects being evacuated.
>
> Testing:
> tier1
> Generic performance testing didn't find any significant difference.
> Looking at just GCBasher evacuation rate, there may to be a small
> improvement, though it's hard to measure.
Looks good.
-------------
Marked as reviewed by sjohanss (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/504
More information about the hotspot-gc-dev
mailing list