RFR (S) Make tenuring threshold unsigned
Jesper Wilhelmsson
jesper.wilhelmsson at oracle.com
Wed Sep 26 13:18:52 UTC 2012
John and Jon,
Thanks for the reviews!
All comments below has been taken care of. I updated the webrev in place:
http://cr.openjdk.java.net/~jwilhelm/TenuringThreshold/
/Jesper
On 2012-09-25 22:53, John Cuthbertson wrote:
> Hi Jesper,
>
> Looks OK except for the nits below:
>
>
> cmsAdaptiveSizePolicy.cpp:
> Line 1318: Change the format descriptor.
>
> g1CollectorPolicy.hpp:
> Looks like you missed this file:
>
> Line 844:
> // Current tenuring threshold, set to 0 if the collector reaches the
> // maximum amount of suvivors regions.
> int _tenuring_threshold;
>
> Line 865:
> age should be unsigned too.
>
> psScavenge.cpp:
> Line 528: Change the format descriptor.
>
> psScavenge.hpp:
> Line 91: Missed
> static int tenuring_threshold() { return _tenuring_threshold; }
>
> adaptiveSizePolicy.cpp
> Looks like you missed this file:
> Line 643:
> bool AdaptiveSizePolicy::print_adaptive_size_policy_on(
> outputStream* st,
> int tenuring_threshold_arg) const {
>
> Line 666: Change format descriptor
>
> adaptiveSizePolic.hpp:
> Line 493:
> Another missed:
> bool print_adaptive_size_policy_on(outputStream* st, int
> tenuring_threshold) const;
>
> ageTable.cpp:
> Line 99: Change format descriptors.
>
> defNewGeneration.hpp:
> Another file missed:
> Line 46:
> int _tenuring_threshold; // Tenuring threshold for next collection.
>
> Line 328:
> int tenuring_threshold() { return _tenuring_threshold; }
>
> vmStructs.cpp:
> Another miss:
> Line 511:
> nonstatic_field(DefNewGeneration, _tenuring_threshold,
> int) \
>
> arguments.cpp:
> Line 1158:
> tenuring_default should be uintx.
>
> oop.hpp:
> Line 330: Shouldn't age() return an unsigned?
>
> JohnC
>
> On 09/24/12 06:57, Jesper Wilhelmsson wrote:
>> Hi,
>>
>> While working on a different change I noticed that the tenuring threshold
>> was stored in a signed int. This struck me as odd, and since I wanted to
>> avoid some unintuitive casts in my other change I would prefer to change the
>> threshold to an unsigned.
>>
>> The change is available here:
>>
>> http://cr.openjdk.java.net/~jwilhelm/TenuringThreshold/
>>
>> Several files are touched but there's just type changes in a few places per
>> file.
>>
>> In this change I also change the declared type of -XX:MaxTenuringThreshold
>> and -XX:InitialTenuringThreshold to uintx. This should not be a problem
>> since we don't allow negative values for these flags anyway.
>> /Jesper
>
More information about the hotspot-gc-dev
mailing list