RFR: Add JVMTI raw monitor lock/unlock mechanisms
Man Cao
manc at google.com
Tue Apr 30 18:04:48 UTC 2019
The issue now is the code is not guarded by the -XX:+ThreadSanitizer flag
any more.
Perhaps we can add "if (ThreadSanitizer)" to the 4 macros in tsan.hpp? E.g.:
#define TSAN_RAW_LOCK_CREATE(lock) \
TSAN_ONLY(if (ThreadSanitizer) { TsanRawLockCreate(__FILE__, __LINE__,
lock); })
Or maybe we can revive the TSAN_RUNTIME_ONLY macro, and use the following?
#define TSAN_RAW_LOCK_CREATE(lock) \
TSAN_RUNTIME_ONLY(TsanRawLockCreate(__FILE__, __LINE__, lock))
In any case, it seems that there is no clean way to guard the creation of
TsanMutexScope objects with the +ThreadSanitizer flag, but it is probably
OK as it is no-op with -ThreadSanitizer.
-Man
On Mon, Apr 29, 2019 at 6:58 PM Jean Christophe Beyler <jcbeyler at google.com>
wrote:
> Fair enough, I forgot you had added it there while I was adding it in mine.
>
> I merged it to use yours, and because you don't do the fancy do/while in
> the macro, it works as intended then and we can leave it at that then for
> now :)
>
> New webrev is here:
> http://cr.openjdk.java.net/~jcbeyler/jvmti/webrev.06/
>
> I'll add in a future webrev the tests for the other VM operations and try
> to see how we can fix the VM operation also in a future webrev; as soon as
> symbolization is up, we should be able to get testing to be a bit more
> reliable :)
>
> Thanks for the reviews!
> Jc
>
> On Mon, Apr 29, 2019 at 3:17 PM Arthur Eubanks <aeubanks at google.com>
> wrote:
>
>> There is TSAN_ONLY in hotspot/share/utilities/macros.hpp, maybe that's
>> helpful?
>>
>>>
>
> --
>
> Thanks,
> Jc
>
More information about the tsan-dev
mailing list