RFR: 8299125: UnifiedOopRef in JFR leakprofiler should treat thread local oops correctly [v2]
Erik Österlund
eosterlund at openjdk.org
Tue Jan 3 15:29:51 UTC 2023
On Tue, 3 Jan 2023 14:28:00 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
>> src/hotspot/share/jfr/leakprofiler/utilities/unifiedOopRef.inline.hpp line 45:
>>
>>> 43: template<>
>>> 44: inline uintptr_t UnifiedOopRef::addr<uintptr_t>() const {
>>> 45: return (_value & ~tag_mask) LP64_ONLY(>> 1);
>>
>> Why a shift now as well?
>
> I do not remember exactly. But I think there was some ref which on 64 bit which had the third bit set. That is this assert failed:
> `assert((reinterpret_cast<uintptr_t>(ref) & UnifiedOopRef::tag_mask) == 0, "Unexpected low-order bits");`
> I have to remove the shift and test again. I think it is strange given that `ObjectAlignmentInBytes >= 8` but we added the shift for some reason. Or maybe I am just missing something obvious.
ObjectAlignmentInBytes is 4 by default on 32 bit VMs.
-------------
PR: https://git.openjdk.org/jdk/pull/11741
More information about the hotspot-dev
mailing list