RFR [XS]: 8244196: adjust output in os_linux

David Holmes david.holmes at oracle.com
Tue Jun 9 05:21:12 UTC 2020


Hi Stefan,

On 9/06/2020 4:21 am, Stefan Karlsson wrote:
> Hi all,
> 
> I encountered the output of this today, and I think the current output 
> looks pretty bad. From my hs_err file I have this:
> 
> CPU:total 32 (initial active 32) (8 cores per cpu, 2 threads per core) 
> ... much more ...
> Online cpus:
> 0-31
> Offline cpus:
> 
> cache level:
> 1
> cache type:
> Data
> cache size:
> 32K
> cache coherency line size:
> 64
> cache level:
> 1
> cache type:
> Instruction
> cache size:
> 32K
> cache coherency line size:
> 64
> cache level:
> 2
> cache type:
> Unified
> cache size:
> 256K
> cache coherency line size:
> 64
> cache level:
> 3
> cache type:
> Unified
> cache size:
> 20480K
> cache coherency line size:
> 64
> BIOS frequency limitation:
> <Not Available>
> Frequency switch latency (ns):
> 0
> Available cpu frequencies:
> <Not Available>
> Maximum cpu frequency:
> 3200000
> Minimum cpu frequency:
> 1200000
> Current cpu frequency:
> 2799113
> Available governors:
> performance powersave
> Current governor:
> powersave
> Core performance/turbo boost:
> <Not Available>
> 
> It's not easy at all to read. Would you mind if I changed this to:
> Online cpus: 0-31
> Offline cpus:
> cache level: 1
> cache type: Data
> cache size: 32K
> cache coherency line size: 64
> cache level: 1
> cache type: Instruction
> cache size: 32K
> cache coherency line size: 64
> cache level: 2
> cache type: Unified
> cache size: 256K
> cache coherency line size: 64
> cache level: 3
> cache type: Unified
> cache size: 20480K
> cache coherency line size: 64
> BIOS frequency limitation: <Not Available>
> Frequency switch latency (ns): 0
> Available cpu frequencies: <Not Available>
> Maximum cpu frequency: 3200000
> Minimum cpu frequency: 1200000
> Current cpu frequency: 1870913
> Available governors: performance powersave
> Current governor: powersave
> Core performance/turbo boost: <Not Available>
> 
> I don't think we should be too afraid of changing the lines here. We've 
> have been changing other parts of the hs_err files, and if anyone is 
> scraping this info, I think they'll need to adapt.

This is mostly my fault. I was focusing on the changes to 
os::Linux::print_proc_sys_info which originally removed a lot of 
newlines, which I thought may cause issues for anyone scraping the info. 
So Matthias fixed that. But the fix moved the newline printing inside 
_print_ascii_file_h which then caused all the extra newlines that you 
are complaining about. :( Sorry about that.

Given I was concerned about simply removing the newline in all cases 
before, I have to remain concerned about removing them all now. I think 
we need to restore this:

   static void _print_ascii_file_h(const char* header, const char* 
filename, outputStream* st) {
!   st->print("%s", header);

(rather than st->print_cr) and then add the \n in the callers that want 
the header on a line by itself.

David
-----

> Thanks,
> StefanK
> 
> On 2020-04-30 17:46, Baesken, Matthias wrote:
>> Hello, please review this small change to os_linux.cpp  .
>>
>> It  uses the  recently introduced    _print_ascii_file_h
>> Function t more places (makes the code  a bit  shorter ) .
>>
>>
>> Bug/webrev :
>>
>> https://bugs.openjdk.java.net/browse/JDK-8244196
>>
>> http://cr.openjdk.java.net/~mbaesken/webrevs/8244196.0/
>>
>> Thanks, Matthias
> 


More information about the hotspot-dev mailing list