RFR: 8244684: G1 abuses StarTask to also include partial objarray scan tasks
Thomas Schatzl
thomas.schatzl at oracle.com
Tue May 12 09:44:25 UTC 2020
Hi,
On 11.05.20 20:11, Kim Barrett wrote:
> Please review this cleanup of the parallel task queue usage by G1 non-full
> collections. It currently uses queues with StarTask elements, except not
> really. The oop* case is extended via an additional tag to also cover
> partial array scanning tasks. This is accomplished by casting between oop
> and oop* and using misaligned oop* values.
>
> A pair of new classes is added to address this. PartialArrayScanTask wraps
> the source oop for a partial array scan. ScannerTask is a discriminated
> union of oop*, narrowOop*, and PartialArrayScan, using a 2bit low tag in the
> relevant pointers. This provides an easier to understand and safer API,
> without any performance cost.
>
> This change also updates related nomenclature; there were a lot of places
> using "ref" / "reference" for these extended StarTasks, which isn't really
> appropriate for the partial array tasks. So we now use "task" consistently.
>
> Followup RFEs should look at making a similar change to ParallelGC, which
> does the same sort of thing. And now that the support for this new task
Okay.
> type is in a shared place (rather than two private variants in G1 and
> ParallelGC non-full collection classes) it might be worthwhile changing
> other places to use ScannerTask queues rather than separate queues for
> StarTasks and ObjArrayTasks.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8244684
>
> Webrev:
> https://cr.openjdk.java.net/~kbarrett/8244684/open.00/
>
> Testing:
> mach5 tier1-5
>
>
Did you do any performance testing? Not that I expect a difference...
Looks good.
Thomas
More information about the hotspot-gc-dev
mailing list