RFR: 8253694: Remove Thread::muxAcquire() from ThreadCrashProtection() [v3]

David Holmes dholmes at openjdk.java.net
Mon Oct 5 23:07:41 UTC 2020


On Mon, 5 Oct 2020 17:58:52 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> Hi all,
>> 
>> Please review the following patch. Current ThreadCrashProtection() implementation uses static members which requires
>> the use of Thread::muxAcquire() to allow only one user at a time. We can avoid this synchronization requirement if each
>> thread has its own ThreadCrashProtection *data. I tested it builds on Linux, macOS and Windows. Since the
>> JfrThreadSampler is the only one using this I run all the tests from test/jdk/jdk/jfr/. I also run some tests with JFR
>> enabled while forcing a crash in OSThreadSampler::protected_task() and tests passed with several "Thread method sampler
>> crashed" UL output. Also run tiers1-3.  Thanks, Patricio
>
> Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Address Dan's comments

So let me see if I've got this straight. Prior to JDK-8183925 CrashProtection was exclusively for the WatcherThread.
JDK-8183925 generalized that to allow any(?) thread to use it. Now as the only client is the JfrSampler thread we are
making crash protection exclusively only available to it.

-------------

Marked as reviewed by dholmes (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/376


More information about the hotspot-jfr-dev mailing list