RFR: 8246926: Clean up newlines and whitespaces in hs_err files

Stefan Karlsson stefan.karlsson at oracle.com
Tue Jun 9 10:17:29 UTC 2020


Hi all,

Please review this patch to clean up newlines and whitespaces in our 
hs_err files.

  https://cr.openjdk.java.net/~stefank/8246926/webrev.01/
  https://bugs.openjdk.java.net/browse/JDK-8246926

I've uploaded before and after hs_err files here:
  https://cr.openjdk.java.net/~stefank/8246926/webrev.01/hs_err_pid146249.before.log
  https://cr.openjdk.java.net/~stefank/8246926/webrev.01/hs_err_pid196998.after.log

Main cleanups:
- Numerous one-liners where written as two lines:

Old
===
Online cpus:
0-31
Offline cpus:

cache level:
1
cache type:
Data
cache size:
32K
cache coherency line size:
64
<... many more ...>

New
===
Online cpus: 0-31
Offline cpus:
cache level: 1
cache type: Data
cache size: 32K
cache coherency line size: 64


- Many lines missed a space after colon:

Old
===
VM state:not at safepoint (not fully initialized)

New
===
VM state: not at safepoint (not fully initialized)


- Newline after OS

The code looked for various files (on Linux) and dumped their contents. 
The first line ended up on the OS: line, but the rest ended afterwards

Example from Linux:
OS:DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"
uname:Linux

Example from macOS:
OS:uname:Darwin

I couldn't find a quick and clean fix for this, so I simply opted to add 
a newline after "OS:".


- There are a number of cr() calls (or ”\n" prints) that are used to add 
a complete blank line between sections. I moved a few of those out of 
the lower-level print functions, so that the caller could decide if 
there's a need for extra newlines.

Thanks,
StefanK


More information about the hotspot-dev mailing list