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

Langer, Christoph christoph.langer at sap.com
Wed Dec 4 14:50:20 UTC 2019


Hi Matthias,

your latest version looks fine to me, too. Thanks for doing this.

/Christoph

> -----Original Message-----
> From: Baesken, Matthias <matthias.baesken at sap.com>
> Sent: Mittwoch, 4. Dezember 2019 09:12
> To: David Holmes <david.holmes at oracle.com>; Langer, Christoph
> <christoph.langer at sap.com>; Schmidt, Lutz <lutz.schmidt at sap.com>;
> 'hotspot-dev at openjdk.java.net' <hotspot-dev at openjdk.java.net>
> Subject: RE: 8234397: add OS uptime information to os::print_os_info output
> 
> 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