RFR: 8299125: UnifiedOopRef in JFR leakprofiler should treat thread local oops correctly [v2]

Markus Grönlund mgronlun at openjdk.org
Tue Jan 3 14:46:50 UTC 2023


On Tue, 3 Jan 2023 14:27:48 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

>> src/hotspot/share/jfr/leakprofiler/chains/rootSetClosure.cpp line 51:
>> 
>>> 49:   assert(ref != NULL, "invariant");
>>> 50:   assert(is_aligned(ref, HeapWordSize), "invariant");
>>> 51:   if (NativeAccess<>::oop_load(ref) != nullptr) {
>> 
>> Why is this needed now?
>
> The GC requires that load barriers to access oops in native storage. Currently the raw load works on all GCs as it only checks for null and all GCs encode null as NULL. But it is semantically wrong, and will not work with generational ZGC where there exist colored null which is not encoded as NULL.

Thanks. Should not the same construct be used in RawRootClosure? Or is it not needed there because the raw references to oops are not loaded through the Access Api?

-------------

PR: https://git.openjdk.org/jdk/pull/11741


More information about the hotspot-dev mailing list