[aarch64-port-dev ] RFR: 8216557 Aarch64: Add support for Concurrent Class Unloading

Stuart Monteith stumon01 at arm.com
Wed Apr 8 15:33:20 UTC 2020


I see what you did there. This comes back to our previous discussion
about the value of having immediate oops at all. isn't that what you are
effectively suggesting? That would simply the code somewhat.


On 08/04/2020 14:08, Andrew Haley wrote:
> On 4/7/20 1:25 PM, Andrew Haley wrote:
>> On 4/7/20 12:52 PM, Andrew Haley wrote:
>>> I notice that even after applying your patch we are still using embedded
>>> OOPs in two places.
>>>
>>> Here in aarch64.ad:
>>>
>>>       if (rtype == relocInfo::oop_type) {
>>>         __ movoop(dst_reg, (jobject)con, /*immediate*/true);
>>>       }
>>>
>>> and here in sharedRuntime_aarch64.cpp:
>>>
>>>     //  load oop into a register
>>>     __ movoop(c_rarg1,
>>>               JNIHandles::make_local(method->method_holder()->java_mirror()),
>>>               /*immediate*/true);
>>>
>>> Why is this?
>>
>> Ah, the second one is a handle, of course, and AFAIK handles don't move.
>> Having said that, the use of movoop on something that is the address of an
>> oop rather than an oop is odd,but it's done on other targets.
>>
>> The C2 one is still suspect.
>
> I made the following changes, bootstrap still works:
>
> diff -r cd06d732d5f0 src/hotspot/cpu/aarch64/aarch64.ad
> --- a/src/hotspot/cpu/aarch64/aarch64.ad      Wed Apr 08 08:57:07 2020 -0400
> +++ b/src/hotspot/cpu/aarch64/aarch64.ad      Wed Apr 08 09:03:18 2020 -0400
> @@ -3160,7 +3160,7 @@
>      } else {
>        relocInfo::relocType rtype = $src->constant_reloc();
>        if (rtype == relocInfo::oop_type) {
> -        __ movoop(dst_reg, (jobject)con, /*immediate*/true);
> +        __ movoop(dst_reg, (jobject)con, /*immediate*/false);
>        } else if (rtype == relocInfo::metadata_type) {
>          __ mov_metadata(dst_reg, (Metadata*)con);
>        } else {
> diff -r cd06d732d5f0 src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
> --- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp      Wed Apr 08 08:57:07 2020 -0400
> +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp      Wed Apr 08 09:03:18 2020 -0400
> @@ -4145,7 +4145,7 @@
>    if (! immediate) {
>      // nmethod barriers need to be ordered with respected to oop accesses, so
>      // we can't use immediate literals as that would necessitate ISBs.
> -    if (BarrierSet::barrier_set()->barrier_set_nmethod() != NULL) {
> +    if (0 && BarrierSet::barrier_set()->barrier_set_nmethod() != NULL) {
>        adr(dst, InternalAddress(address_constant((address)obj, rspec)));
>        ldr(dst, Address(dst));
>      } else {
> diff -r cd06d732d5f0 src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
> --- a/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp       Wed Apr 08 08:57:07 2020 -0400
> +++ b/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp       Wed Apr 08 09:03:18 2020 -0400
> @@ -1676,11 +1676,10 @@
>
>    // Pre-load a static method's oop into c_rarg1.
>    if (method->is_static() && !is_critical_native) {
> -
>      //  load oop into a register
>      __ movoop(c_rarg1,
>                JNIHandles::make_local(method->method_holder()->java_mirror()),
> -              /*immediate*/true);
> +              /*immediate*/false);
>
>      // Now handlize the static class mirror it's known not-null.
>      __ str(c_rarg1, Address(sp, klass_offset));
> diff -r cd06d732d5f0 src/hotspot/share/runtime/sharedRuntime.cpp
> --- a/src/hotspot/share/runtime/sharedRuntime.cpp     Wed Apr 08 08:57:07 2020 -0400
> +++ b/src/hotspot/share/runtime/sharedRuntime.cpp     Wed Apr 08 09:03:18 2020 -0400
> @@ -2873,6 +2873,7 @@
>        CodeBuffer buffer(buf);
>        double locs_buf[20];
>        buffer.insts()->initialize_shared_locs((relocInfo*)locs_buf, sizeof(locs_buf) / sizeof(relocInfo));
> +      buffer.initialize_consts_size(8);
>        MacroAssembler _masm(&buffer);
>
>        // Fill in the signature array, for the calling-convention call.
>

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


More information about the zgc-dev mailing list