RFR (S): 8143215: gcc 4.1.2: fix three issues breaking the build.

Kim Barrett kim.barrett at oracle.com
Mon Dec 14 20:35:19 UTC 2015


On Dec 14, 2015, at 7:36 AM, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:
> 
> Hi,
> 
> On Mon, 2015-12-14 at 13:03 +0100, Bengt Rutisson wrote:
>> Hi Goetz,
>> 
>> On 2015-12-14 12:19, Lindenmaier, Goetz wrote:
>>> Hi,
>>> 
>>> I removed the change to g1CollectedHeap.cpp
>>> ("8145303: Clean up the units for log_gc_footer" will fix this)
>>> and changed the flag to 'double'. New webrev:
>>> http://cr.openjdk.java.net/~goetz/webrevs/8143215-gcc412/webrev.05/
>> 
>> This looks good to me, but I haven't been following this thread closely 
>> so it would be good if Kim and Thomas take a look too.
>> 
> 
> - I would prefer to keep CMSMaxAbortablePrecleanTime an integer value
> (uintx/size_t) and then just cast for now. If we keep it a double, it is
> imo a good idea to keep its max range to max_intx anyway. Using
> MAX_DOUBLE will just cause grief for no gain.
> 
> One option would be to change the return value of
> CMSPhaseAccounting::wallclock_millis() to an integer value (size_t?),
> make CMSMaxAbortablePrecleanTime a size_t too, and cast in that method.
> I do not see a problem with slight comparison result differences due to
> truncating the double.
> 
> Kim might have some other preference.

I *think* the simplest change is to make the return type for
wallclock_millis be double.  Then it matches type of the value it
obtains from TimeHelper::counter_to_millis.  This will lead to a
comparison between that double value and the integral
CMSMaxAbortablePrecleanTime, but that shouldn't be a problem.

Aside: I wish we had a decent framework for time value manipulation,
rather than various combinations of counters, seconds, millis (and
maybe others?) represented by doubles or various integer types.  The
C++11 <chrono> facilities would be nice to have.




More information about the hotspot-gc-dev mailing list