RFR: 8268638: semaphores of AsyncLogWriter may be broken when JVM is exiting. [v4]

Xin Liu xliu at openjdk.java.net
Tue Jun 15 07:24:11 UTC 2021


On Tue, 15 Jun 2021 06:28:35 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Do not do sanity check for AsyncLogLocker
>
> src/hotspot/share/logging/logAsyncWriter.cpp line 36:
> 
>> 34:  public:
>> 35:   AsyncLogLocker(Semaphore* sem): _sem(sem) {
>> 36:     _sem->wait();
> 
> This class is not general purpose. It does not need to accept an arbitrary semaphore. There is only one semaphore this class works with and that is AsyncLogWriter::_instance->_lock, so it can just use it directly.

Update.  declare AsyncLogLocker as an inner class so we don't need declare it as a friend.

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

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


More information about the hotspot-runtime-dev mailing list