RFR: 8366658: Add missing locks when accessing the VirtualMemoryTracker instance in tests and MemMapPrinter
    David Holmes 
    dholmes at openjdk.org
       
    Fri Sep 12 02:24:12 UTC 2025
    
    
  
On Tue, 2 Sep 2025 07:07:51 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
> Hi,
> 
> This PR adds the missing locks for the tests and MemMapPrinter, also fixes a small bug in `walk_virtual_memory`. See inline review comments.
> 
> Passes tier1.
src/hotspot/share/nmt/virtualMemoryTracker.hpp line 347:
> 345: 
> 346: class VirtualMemoryWalker : public StackObj {
> 347: public:
Suggestion:
 public:
The access modifier should be indented by 1
test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp line 50:
> 48:       MemTracker::NmtVirtualMemoryLocker nvml;
> 49:       VirtualMemoryTracker::Instance::snapshot_thread_stacks();
> 50:     }
Why two separate locking blocks?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27038#discussion_r2342779331
PR Review Comment: https://git.openjdk.org/jdk/pull/27038#discussion_r2342780510
    
    
More information about the hotspot-runtime-dev
mailing list