RFR: Reimplement TsanOopMap support using WeakHandle and ResizeableResourceHashtable [v4]
Jiangli Zhou
jiangli at openjdk.org
Tue Jul 23 23:45:40 UTC 2024
On Tue, 23 Jul 2024 01:23:40 GMT, Man Cao <manc at openjdk.org> wrote:
>> Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update TsanOopMap.hpp comment with more details.
>
> src/hotspot/share/tsan/tsanOopMap.cpp line 302:
>
>> 300:
>> 301: {
>> 302: MutexLocker mu(TsanOopMap_lock, Mutex::_no_safepoint_check_flag);
>
> Do we really need this lock if it is called during a GC pause by only the VM thread? Currently it is called by multiple GC threads, so the lock might appear necessary.
>
> Also see the comment in the old `TsanOopMap::weak_oops_do`. We should probably keep that comment.
We need the lock here as it's done in concurrent worker threads that handle the WeakProcessor::WeakOopsDoTasks.
As discussed offline today, doing the tsanOopMap processing and tsan notification in WeakProcessor::Task::work is cleaner and more maintainable than other possible alternatives.
-------------
PR Review Comment: https://git.openjdk.org/tsan/pull/19#discussion_r1688889861
More information about the tsan-dev
mailing list