RFR: 8284848: C2: Compiler blackhole arguments should be treated as globally escaping [v3]

Vladimir Kozlov kvn at openjdk.java.net
Mon Apr 18 18:50:40 UTC 2022


On Fri, 15 Apr 2022 13:35:40 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Blackholes should make the arguments to be treated as globally escaping, to match the expected behavior of legacy JMH blackholes. See more discussion in the bug.
>> 
>> Additional testing:
>>  - [x] Linux x86_64 fastdebug `tier1`
>>  - [x] Linux x86_64 fastdebug `tier2`
>>  - [x] OpenJDK microbenchmark corpus sanity run
>
> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
> 
>  - Merge branch 'master' into JDK-8284848-blackhole-ea-args
>  - Fix failures found by microbenchmark corpus run 1
>  - IR tests
>  - Handle only pointer arguments
>  - Fix

Got failure in new tests when run with ` -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -XX:-TieredCompilation`.

`BlackholeSyncEATest.java` failed:


Failed IR Rules (2) of Methods (1)
----------------------------------
1) Method "static void compiler.c2.irTests.blackhole.BlackholeSyncEATest.testBlackholed()" - [Failed IR rules: 2]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(applyIf={}, applyIfAnd={}, failOn={}, applyIfOr={}, counts={"(\\\\d+(\\\\s){2}(FastLock.*)+(\\\\s){2}===.*)", "1"}, applyIfNot={})"
     - counts: Graph contains wrong number of nodes:
       * Regex 1: (\\d+(\\s){2}(FastLock.*)+(\\s){2}===.*)
         - Failed comparison: [found] 0 = 1 [given]
         - No nodes matched!
   * @IR rule 2: "@compiler.lib.ir_framework.IR(applyIf={}, applyIfAnd={}, failOn={}, applyIfOr={}, counts={"(\\\\d+(\\\\s){2}(FastUnlock.*)+(\\\\s){2}===.*)", "1"}, applyIfNot={})"
     - counts: Graph contains wrong number of nodes:
       * Regex 1: (\\d+(\\s){2}(FastUnlock.*)+(\\s){2}===.*)
         - Failed comparison: [found] 0 = 1 [given]
         - No nodes matched!
         
Compilation(s) of failed match(es):
>>> Compilation of static void compiler.c2.irTests.blackhole.BlackholeSyncEATest.testBlackholed():
PrintIdeal:
 3  Start  ===  3  0  [[ 3  5  6  7  8  9 ]]  #{0:control, 1:abIO, 2:memory, 3:rawptr:BotPTR, 4:return_address}
 9  Parm  ===  3  [[ 105 ]] ReturnAdr !jvms: BlackholeSyncEATest::testBlackholed @ bci:-1 (line 75)
 8  Parm  ===  3  [[ 105 ]] FramePtr !jvms: BlackholeSyncEATest::testBlackholed @ bci:-1 (line 75)
 7  Parm  ===  3  [[ 105 ]] Memory  Memory: @BotPTR *+bot, idx=Bot; !orig=[34],40 !jvms: BlackholeSyncEATest::testBlackholed @ bci:-1 (line 75)
 6  Parm  ===  3  [[ 105 ]] I_O !orig=[35] !jvms: BlackholeSyncEATest::testBlackholed @ bci:-1 (line 75)
 5  Parm  ===  3  [[ 105 ]] Control !orig=[29],[38],[79],[83],[87],[91] !jvms: BlackholeSyncEATest::testBlackholed @ bci:-1 (line 75)
 105  Return  ===  5  6  7  8  9  [[ 0 ]] 
 0  Root  ===  0  105  [[ 0  1  3  20  21  22  108  107 ]] inner 



`BlackholeStoreStoreEATest.java`:


Failed IR Rules (1) of Methods (1)
----------------------------------
1) Method "static void compiler.c2.irTests.blackhole.BlackholeStoreStoreEATest.testBlackholed()" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(failOn={}, applyIf={}, applyIfAnd={}, applyIfOr={}, counts={"(\\\\d+(\\\\s){2}(MemBarStoreStore.*)+(\\\\s){2}===.*)", "1"}, applyIfNot={})"
     - counts: Graph contains wrong number of nodes:
       * Regex 1: (\\d+(\\s){2}(MemBarStoreStore.*)+(\\s){2}===.*)
         - Failed comparison: [found] 0 = 1 [given]
         - No nodes matched!

Compilation(s) of failed match(es):
>>> Compilation of static void compiler.c2.irTests.blackhole.BlackholeStoreStoreEATest.testBlackholed():
PrintIdeal:
 3  Start  ===  3  0  [[ 3  5  6  7  8  9 ]]  #{0:control, 1:abIO, 2:memory, 3:rawptr:BotPTR, 4:return_address}
 9  Parm  ===  3  [[ 89 ]] ReturnAdr !jvms: BlackholeStoreStoreEATest::testBlackholed @ bci:-1 (line 55)
 8  Parm  ===  3  [[ 89 ]] FramePtr !jvms: BlackholeStoreStoreEATest::testBlackholed @ bci:-1 (line 55)
 7  Parm  ===  3  [[ 89 ]] Memory  Memory: @BotPTR *+bot, idx=Bot; !orig=[34],40 !jvms: BlackholeStoreStoreEATest::testBlackholed @ bci:-1 (line 55)
 6  Parm  ===  3  [[ 89 ]] I_O !orig=[35] !jvms: BlackholeStoreStoreEATest::testBlackholed @ bci:-1 (line 55)
 5  Parm  ===  3  [[ 89 ]] Control !orig=[29],[38] !jvms: BlackholeStoreStoreEATest::testBlackholed @ bci:-1 (line 55)
 89  Return  ===  5  6  7  8  9  [[ 0 ]] 
 0  Root  ===  0  89  [[ 0  1  3  20  21  22  91  92 ]] inner

-------------

PR: https://git.openjdk.java.net/jdk/pull/8228


More information about the hotspot-compiler-dev mailing list