RFR: 8274794: Print all owned locks in hs_err file [v2]

David Holmes dholmes at openjdk.java.net
Mon Oct 18 07:03:50 UTC 2021


On Sat, 16 Oct 2021 06:15:39 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Make mutex_array be a linked list.
>
> src/hotspot/share/runtime/mutex.cpp line 280:
> 
>> 278:     ThreadCritical tc;
>> 279:     Mutex* old_next = _next_mutex;
>> 280:     assert(old_next != nullptr, "only static mutexes don't have a next");
> 
> This was a brainteaser till I realized that the end of the list is composed of the Mutexes created first, which we don't delete. Maybe add that as a comment?

Isn't it only the very first Mutex we create (statically) that doesn't have a next?

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

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


More information about the hotspot-dev mailing list