RFR: 8265120: hs_err improvement: align the output of Virtual space metadata

Frank King github.com+16741972+whjpji at openjdk.java.net
Wed Apr 14 22:15:40 UTC 2021


In the "virtual space" section of the VM error log, the "Both" line doesn't align well will the above two lines - there is a redundant leading space in this line.


Metaspace:

Usage:
  Non-class:    216.95 KB used.
      Class:     10.45 KB used.
       Both:    227.40 KB used.

Virtual space:
  Non-class space:        8.00 MB reserved,     320.00 KB (  4%) committed,  1 nodes.
      Class space:        1.00 GB reserved,     128.00 KB ( <1%) committed,  1 nodes.
              Both:        1.01 GB reserved,     448.00 KB ( <1%) committed.     <---- Not aligned here


It can be simply fixed by removing the redundant space in function `print_vs` in `src/hotspot/share/memory/metaspace/metaspaceReporter.cpp`.

Here is the fixed result:

Metaspace:

Usage:
  Non-class:    216.95 KB used.
      Class:     10.45 KB used.
       Both:    227.40 KB used.

Virtual space:
  Non-class space:        8.00 MB reserved,     320.00 KB (  4%) committed,  1 nodes.
      Class space:        1.00 GB reserved,     128.00 KB ( <1%) committed,  1 nodes.
             Both:        1.01 GB reserved,     448.00 KB ( <1%) committed.    <----- Fixed

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

Commit messages:
 - 8265120: hs_err improvement: align the output of Virtual space metadata.

Changes: https://git.openjdk.java.net/jdk/pull/3458/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3458&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8265120
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3458.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3458/head:pull/3458

PR: https://git.openjdk.java.net/jdk/pull/3458


More information about the hotspot-runtime-dev mailing list