8234397: add OS uptime information to os::print_os_info output
David Holmes
david.holmes at oracle.com
Wed Dec 4 11:40:36 UTC 2019
On 4/12/2019 6:11 pm, Baesken, Matthias wrote:
> Hi David, I think I stay away from the unification .
> May I add you as a reviewer ?
Of course.
David
> 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