RFR: Reimplement TsanOopMap support using WeakHandle and ResizeableResourceHashtable [v6]
Man Cao
manc at openjdk.org
Wed Jul 24 20:28:47 UTC 2024
On Wed, 24 Jul 2024 02:11:22 GMT, Man Cao <manc at openjdk.org> wrote:
>> Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Sort moves for overlapping case only.
>
> src/hotspot/share/tsan/tsanOopMapTable.hpp line 67:
>
>> 65:
>> 66: void release_weak_handle() const;
>> 67: oop object_no_keepalive() const;
>
> I'm a bit unsure about the use of `oop` type vs `oopDesc*` type. Could we keep using `oopDesc*` type in `object_no_keepalive()`, `obj()`, `equals()` and `update_obj()`? E.g., whenever calling `_wh.peek()`, immediately cast the return value to a `oopDesc*`.
>
> They are the same type in a release build, but different in a debug build. I vaguely recall that TsanOopSizeMap used `oop` in the JDK7/8 era, but switched to `oopDesc*` due to errors in debug build.
Alternatively, it might be OK to declare TsanOopMapTableKey::_obj as an `oop` instead of `oopDesc*`. The main point is to avoid type conversions in various places.
-------------
PR Review Comment: https://git.openjdk.org/tsan/pull/19#discussion_r1690382737
More information about the tsan-dev
mailing list