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

David Holmes dholmes at openjdk.java.net
Thu Apr 15 04:56:34 UTC 2021


On Tue, 13 Apr 2021 09:51:01 GMT, Frank King <github.com+16741972+whjpji at openjdk.org> wrote:

> 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

This is a trivial fix. I will sponsor this for you.

Thanks,
David

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

Marked as reviewed by dholmes (Reviewer).

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


More information about the hotspot-runtime-dev mailing list