RFR: 8299125: UnifiedOopRef in JFR leakprofiler should treat thread local oops correctly [v2]
Axel Boldt-Christmas
aboldtch at openjdk.org
Tue Jan 3 15:01:51 UTC 2023
On Tue, 3 Jan 2023 14:43:45 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
>> 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?
Raw storage has no GC barriers so a null oop there must be NULL. The RawAccess API is really only used when dealing with narrowOop or templated generic code which can be either. `RawAccess<>::oop_load(oop* ref)` will just become a `*ref`. I think I used RawAccess everywhere initially ,but @fisk thought that it should not be used for raw oop*, not sure if there were some other reason behind it than it being unnecessary / obfuscating.
-------------
PR: https://git.openjdk.org/jdk/pull/11741
More information about the hotspot-dev
mailing list