RFR: 8254315: Shenandoah: Concurrent weak reference processing [v10]
Roman Kennke
rkennke at openjdk.java.net
Wed Oct 21 20:12:22 UTC 2020
On Mon, 19 Oct 2020 14:42:25 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
>> Roman Kennke has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Add fallback support for new properties in ObjArrayChunkedTask
>> - Fix 32bit interpreter LRB-native call
>
> src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp line 64:
>
>> 62: void load_reference_barrier_not_null(MacroAssembler* masm, Register dst, Address load_addr);
>> 63: void load_reference_barrier_native(MacroAssembler* masm, Register dst, Address load_addr, bool native);
>> 64:
>
> is_native parameter seems weird. Maybe invert to is_weak_ref?
> BTW, I think I am seeing compressed oops in conc-stack-scanning.
I think it's clearer as it is. The motivation for this is that native references are always oops, while weak reference's referents can be oops or narrowOops. Which means that we need to call a different method for native-refs (the always-oops entry point).
The interesting differentiator is native vs. not-native, because one is always-oops, the other can be narrowOop. Weak vs not-weak is not as clear because there can also be weak/phantom native-refs.
> src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp line 399:
>
>> 397:
>> 398: save_xmm_registers(masm);
>> 399: if (UseCompressedOops && !native) {
>
> What's problem you saw with compressed oop + native?
None, but see above.
> src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.hpp line 42:
>
>> 40: WEAK
>> 41: };
>> 42: private:
>
> Declare as enum class for stronger typing?
Ok will do.
> src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp line 750:
>
>> 748: __ load_parameter(0, r0);
>> 749: __ load_parameter(1, r1);
>> 750: if (kind == ShenandoahBarrierSet::NATIVE) {
>
> Use "switch" statement to be consistent with above
OK.
> src/hotspot/share/gc/shenandoah/shenandoahReferenceProcessor.hpp line 139:
>
>> 137:
>> 138: // template <typename T>
>> 139: // void keep_alive(oop reference, ReferenceType type) const;
>
> Remove this
Ok.
> src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.hpp line 100:
>
>> 98: oop load_reference_barrier_not_null(oop obj);
>> 99:
>> 100: template <class T>
>
> class -> typename also?
Right. Will do.
-------------
PR: https://git.openjdk.java.net/jdk/pull/505
More information about the shenandoah-dev
mailing list