8234397: add OS uptime information to os::print_os_info output

Baesken, Matthias matthias.baesken at sap.com
Wed Dec 4 08:11:43 UTC 2019


Hi David,  I  think I stay away from the unification .
May I add you as a reviewer ?

Best regards, Matthias

> 
> Hi Matthias,
> 
> On 4/12/2019 1:38 am, Baesken, Matthias wrote:
> > Hi David,  here is a new webrev   based on  your comments :
> >
> > http://cr.openjdk.java.net/~mbaesken/webrevs/8234397.4/
> 
> Thanks for the updates.
> 
> >>
> >> Is %llu supported by all compilers (32-bit as well)?
> >>
> >
> > Not sure , I checked and  it works  with VS2017/32bit.  But I don't know
> about other compilers.    So I better use long / %ld.
> 
> I think int would be fine - 2^31 seconds is a long time.
> 
> >
> > Btw I noticed that
> >
> > os::print_date_and_time
> >   ...
> >   // print elapsed time in a human-readable format:
> >
> > Contains  very similar coding  to  what I do in os::print_dhm  -->  should this
> maybe be unified ?
> 
> I don't really see a way to unify. You might hoist the constants out to
> be static in the file for sharing:
> 
>    const int secs_per_day  = 86400;
>    const int secs_per_hour = 3600;
>    const int secs_per_min  = 60;
> 
> and add others as needed.
> 



More information about the hotspot-dev mailing list