RFR: 8362276: NMT tests should have locks for the entire tests [v2]

Coleen Phillimore coleenp at openjdk.org
Wed Jul 16 13:12:41 UTC 2025


On Tue, 15 Jul 2025 22:48:30 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

>> We restructure the code to make sure we cover the code that uses the global tree instance (but nothing else that uses the same lock internally) as needed:
>> 
>> - we move MemoryReserver::reserve() to the top to do as the first thing
>> - we grab the MemTracker::NmtVirtualMemoryLocker nvml
>> - do all the usual test stuff, including checking, which grabs the global instance of the tree
>> - we move remove_all() to the very bottom to do as the last thing
>> 
>> Testing: runnig Mach5 tier1-4 right now...
>
> Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:
> 
>   restructure code to make sure we use the lock as needed

This looks good.  Thank you for fixing the crash Gerard, and thank you for your attention to this bug Aleksey.

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

Marked as reviewed by coleenp (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/26324#pullrequestreview-3024929497


More information about the hotspot-runtime-dev mailing list