RFR: 8246718: ParallelGC should not check for forward objects for copy task queue

Erik Österlund erik.osterlund at oracle.com
Mon Jun 8 06:59:30 UTC 2020


Hi Kim,

Looks good.

Thanks,
/Erik

On 2020-06-07 07:08, Kim Barrett wrote:
> Please review this change to the handling of copy tasks by ParallelGC.
> Formerly, before adding a task entry to the queue it would check
> whether the referenced object was already forwarded.  If so, it would
> handle the reference immediately, inline, rather than pushing the task
> onto the queue.
>
> Measurements show that a no-worse and sometimes better (depending on
> the hardware configuration) approach for most applications is to not
> do the forwarding check, but to instead prefetch the start of the
> referenced object and then always push the task.
>
> The corresponding G1 code does a for-write prefetch on the mark word
> of the object, and a for-read prefetch past the object header.
> Measurements with ParallelGC found the for-read prefetch not very
> productive, and possibly even slightly counter-productive, so this
> change only does the for-write prefetch on the mark word.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8246718
>
> Webrev:
> https://cr.openjdk.java.net/~kbarrett/8246718/
>
> Testing:
> mach5 tier1-5
> various performance tests
>



More information about the hotspot-gc-dev mailing list