RFR 8134995(M): [REDO] GC: implement ranges (optionally constraints) for those flags that have them missing

sangheon.kim sangheon.kim at oracle.com
Thu Oct 1 18:20:46 UTC 2015


Hi Kim,

On 10/01/2015 10:52 AM, Kim Barrett wrote:
> On Oct 1, 2015, at 12:24 PM, sangheon.kim <sangheon.kim at oracle.com> wrote:
>> Hi all,
>>
>> During this code review, newly added gc test found a problem of 1 gc constraint function(MaxGCPauseMillisConstraintFunc).
>>
>> So I updated it and related function (GCPauseIntervalMillisConstraintFunc).
>> - Added checking for MaxGCPauseMillis and GCPauseIntervalMillis whether these are set via commandline or not to proceed the constraint function logic.
>>
>> http://cr.openjdk.java.net/~sangheki/8134995/webrev.03
>> http://cr.openjdk.java.net/~sangheki/8134995/webrev.03_to_02/
>>
>> * Testing: JPRT and RBT(to manually test runtime/CommandLine for embedded)
> This change doesn't seem right.  There is a relationship between these
> two values that should hold after all the argument processing is done,
> and it doesn't matter where the values came from.  All of the
> FLAG_IS_CMDLINE checks (including those from earlier versions) in
> these constraint functions now seem questionable to me.
>
> It seems to me that if there is an unexpected test failure here, then
> the problem is that some "ergonomic" setting of these values is
> occurring after the constraint function is being called.  Or
> alternatively, the ergnonomic settings are not right in some cases.
The reason of test failure is simply can't pass the constraint function.
The test is setting only 'MaxGCPauseMillis=30000' which means 
GCPauseIntervalMillis will have default value of 0(zero means set 
ergonomically).
Without constraint function, G1CollectorPolicy will set 
GCPauseIntervalMillis=30001.
No problem with the test.

For G1, 'MaxGCPauseMillis >= GCPauseIntervalMillis' is one of the 
condition should be kept.
But the constraint function is trying to compare 30000(set via cmd line) 
vs. 0(default).
The intend of using FLAG_IS_CMDLINE() is to avoid comparison with 
default value which means set ergonomically.

All other cases that using FLAG_IS_CMDLINE() is for same purpose, to 
avoid comparison with default value.

Thanks,
Sangheon


More information about the hotspot-dev mailing list