RFR(S): 8008211 : Some of WB tests on compiler fails

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Feb 19 12:41:27 PST 2013


On 2/19/13 12:12 PM, Igor Ignatyev wrote:
> There are two different reasons for this failure:
>
>     1. with '-Xcomp':
> CompilerWhiteBoxTest#method() is inlined into #compile() on first
> invocation of #test(). so 'WHITE_BOX.setDontInlineMethod(METHOD, true)'
> does nothing; #method() isn't compiled;

You need to make method() more complex to avoid it. Currently it is 
treated as an "accessor" method and it is inlinined unconditionally. For 
example, pass argument and return increment (x+42).
I don't see how moving WHITE_BOX.setDontInlineMethod() helps.

>
>     2. with '-XX:+TieredCompilation' and certain relation between
> 'CompileThreshold' and 'Tier*' values (e.g. -XX:CompileThreshold=100 and
> default Tier* values):
> since 'CompileThreshold' doesn't use in Tiered as threshold, but uses in
> tests we have situation in which CompilerWhiteBoxTest#compile() invokes
> #method() insufficient time for compilation;


With Tiered the default threshold for first tier (C1) is 100. Yes, for 
C2 it is >10000 and depends on other staff. But COMPILE_THRESHOLD=10000 
should be enough for tier one compilation. So I don't understand what do 
you mean by "invokes insufficient time for compilation".

And I really don't like next code:

!         int count = getCompileThreshold();
!         int i = 0;
!         do {
!             for (; i < count; ++i) {
                   result += method();
               }
+             count = getCompileThreshold();
+         } while (i < count);

You are using in getCompileThreshold() the knowledge of current tiered 
threashold implementation.  But it could be changed in a future.

Vladimir

>
> Best regards,
> Igor Ignatyev
>
> On 02/19/2013 10:49 PM, Vladimir Kozlov wrote:
>> Igor,
>>
>> Can you give mode details about the failure?
>>
>> Thanks,
>> Vladimir
>>
>> On 2/19/13 9:37 AM, Igor Ignatyev wrote:
>>> Hi all,
>>>
>>> Please review the patch.
>>>
>>> 1. calls of WB.setDontInlineMethod() were moved into main()
>>> 2. added estimation of threshold for tiered compilation
>>>
>>> webrev: http://cr.openjdk.java.net/~iignatyev/8008211/webrev.00/


More information about the hotspot-compiler-dev mailing list