On Fri, 20 Dec 2024 17:43:29 GMT, Robert Toyonaga <d...@openjdk.org> wrote:

> I don't think this should ever get called during bootstrapping because thread 
> stacks are only accounted lazily when a snapshot is created. I don't think an 
> NMT snapshot would ever get created during bootstrapping, but just in case, 
> I've added a check for `MemTracker::is_bootstrapping_done()`.


It could be called as part of the NMT report error reporting during early JVM 
initialization => between NMT bootstrap and Mutex system startup. That report 
is only written though if NMT is enabled, and that requires NMT to have been 
bootstrapped. Is NMT bootstrap after Mutex system bootstrap? Then we are fine 
here.

Man, I start warming up to your original idea of just using a plain OS-side 
mutex for NMT lockes, @roberttoyonaga . One that always works. Problem is 
missing deadlock detection.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22745#discussion_r1895379917

Reply via email to