RFR(M) 8227003: [Graal] java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java time out

Igor Veresov igor.veresov at oracle.com
Fri Oct 4 13:36:19 UTC 2019


> On Oct 4, 2019, at 4:06 AM, Claes Redestad <claes.redestad at oracle.com> wrote:
> 
> Hi!
> 
> I think the subject of this RFE should be updated to better reflect the
> feature being added, and not the test issue that motivated it.
> 

Yes, probably.


> Is the plan to keep this feature around once AOT-compiled Graal is supported/integrated? If not then TieredMode should probably be
> diagnostic or even experimental to simplify eventually removing it.
> 

Yes, the plan is to keep it. We will still be testing Graal in Java mode. Also as I noted I’d like to remove the non-tiered policy in the future. So then -XX:-TieredCompilation will just mean -XX:TieredMode=2

> For tiered mode 4, you're adding 9 new diagnostic flags. Could some
> Tier2 or Tier3 flags be ergonomically repurposed rather? E.g., I guess
> Tier0Delay could reuse Tier3DelayOn/-Off instead, but just go to level 0
> rather than the disabled level 3.

I could, yes, but I decided that it would be confusing to repurpose these flags. There is no level 3, for example.
I could make them a single flag to look like -XX:Tiered40Thresholds=I,j,k,l but I’ll obviously will have to write a parser for that.

Igor

> 
> Thanks!
> 
> /Claes
> 
> On 2019-10-04 08:30, Igor Veresov wrote:
>> The problem with this is that the test wants to run with -XX:-TieredCompilation in order to deterministically test the top level compiler. When we run this test with Graal we add -XX:+UseJVMCICompiler on top of that. The combination of these flags is extremely slow since Graal will have to compile itself while running in the interpreter, which causes timeouts. There are a lot of tests that behave this way.
>> The proposed solution is as follows. We introduce a special mode of tiered compilation that basically emulates the non-tiered mode - application code is profiled in the interpreter and then goes straight to the top level compiler. However, for the code of the JVMCI compiler we make an exception - it still gets to be compiled with C1 (level 1) as it normally does in tiered mode. The new mode integrates with AOT as well. As result the tests in question can execute an order of magnitude faster while still testing the top level compiler as these tests were designed to.
>> I’d like to introduce a -XX:TieredMode=<number> flag to control this. See the webrev for its description.
>> To make the tests work out-of-the-box I check if the flags -XX:-TieredCompilation and -XX:+UseJVMCICompiler are on the command line and turn the tiered compilation back on in non-tiered emulation mode. A warning is issued to alert the user to the change. This mode is also a step towards being able to remove the non-tiered policy.
>> Webrev: http://cr.openjdk.java.net/~iveresov/8227003/webrev.00/
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8227003 <https://bugs.openjdk.java.net/browse/JDK-8227003>
>> igor



More information about the hotspot-compiler-dev mailing list