RFR: 8310134: NMT: thread count in Thread section of VM.native_memory output confusing with virtual threads

Gerard Ziemski gziemski at openjdk.org
Mon Aug 14 20:44:19 UTC 2023


This is a very simple tweak that changes NMT memory monitor output from:


- Thread (reserved=19511KB, committed=19511KB) 
                            (thread #19) 
                            (stack: reserved=19456KB, committed=19456KB) 
                            (malloc=33KB #118) 
                            (arena=21KB #37) 


to


- Thread (reserved=19511KB, committed=19511KB) 
                            (threads #19) 
                            (stack: reserved=19456KB, committed=19456KB) 
                            (malloc=33KB #118) 
                            (arena=21KB #37) 


to signify that we are talking about "thread count of 19" and not "thread with id 19"

There are more opportunities to clean up the output, but that will be handled in a followup bug https://bugs.openjdk.org/browse/JDK-8314227

Tested locally with NMT gtests and jtreg and Mach5 tier1,2,3,4,5

`jtreg -nr -va -jdk:./build/xcode/build/jdk/ test/hotspot/jtreg/runtime/NMT`

`gtestLauncher -jdk ./build/xcode/build/jdk/ --gtest_output=xml:test_result.xml --gtest_catch_exceptions=0 --gtest_filter="NMT*:os*" -XX:NativeMemoryTracking=summary`

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

Commit messages:
 - change 'thread #' to 'threads #' to make clear that we are talking about the count of threads

Changes: https://git.openjdk.org/jdk/pull/15277/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15277&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8310134
  Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/15277.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15277/head:pull/15277

PR: https://git.openjdk.org/jdk/pull/15277


More information about the hotspot-runtime-dev mailing list