RFR: 7165755 OS Information much longer on linux than other platforms

David Holmes david.holmes at oracle.com
Wed May 2 03:18:13 PDT 2012


Hi Nils,

On 2/05/2012 7:38 PM, Nils Loodin wrote:
> When looking at the info from os::print_os_info() in
> src/os/linux/vm/os_linux.cpp:2024 (and other files for other platforms)
> the length of the text is radically longer for linux than other platforms.

Ignoring Windows (with prints very little) I'd say it is the printing of 
/proc/meminfo that is the main difference. Not sure why printing that 
was necessary ... but if we are going to remove it I think we need to 
know why it was added.

> This can make it hard for tool writers to get a summary that look good and similar for multiple platforms (sizing of gui fields, having to parse info in the tool code etc)
> Lookin at the code, it's in some serious need of refactoring. It would be nice with a method to get a "brief" os info for these kinds of tools that looks similar on all platforms.
>
> This is my suggested change:
> http://cr.openjdk.java.net/~nloodin/7165755/webrev.00/

Seems to me some of this could be factored into the top-level OS class 
if we shoehorn Windows into the same shape as the other OSes ;-) Or at 
least perhaps put some of the common stuff into os_posix.cpp ?

Cheers,
David

> Regards,
> Nils Loodin


More information about the hotspot-runtime-dev mailing list