RFR: 8244684: G1 abuses StarTask to also include partial objarray scan tasks
Kim Barrett
kim.barrett at oracle.com
Thu May 14 11:45:13 UTC 2020
> On May 12, 2020, at 5:44 AM, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:
>
> 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…
This change is intended to be just a code and nomenclature cleanup, so
performance neutral. No regressions is good and any improvement is a
bit of unexpected bonus. I ran specjbb2015 locally and G1 performance
tests in Aurora, and all seems okay.
> Looks good.
>
> Thomas
More information about the hotspot-gc-dev
mailing list