RFR: 8369622: GlobalChunkPoolMutex is recursively locked during error handling
David Holmes
dholmes at openjdk.org
Mon Oct 20 00:06:02 UTC 2025
On Fri, 17 Oct 2025 17:04:58 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> This change disables recursive locking for the ChunkPoolLocker during error handling for NMT callers. The patch is written by Johan as an alternative to supporting another recursive locker for this lock.
> Tested with tier1-4, tier5 on aarch64 (product and debug).
src/hotspot/share/nmt/mallocTracker.cpp line 71:
> 69: if (VMError::is_error_reported() && VMError::is_error_reported_in_current_thread()) {
> 70: ls = ChunkPoolLocker::LockStrategy::Try;
> 71: }
Thinking more, we could simply always do this check in the constructor and do away with the "strategy" flag altogether. Arguably this would be reasonable behaviour for every Mutexlocker (though it may slow things down a little).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27869#discussion_r2443565738
More information about the hotspot-runtime-dev
mailing list