RFR: 8309978: [x64] Fix useless padding [v2]

Vladimir Kozlov kvn at openjdk.org
Wed Jun 14 16:40:04 UTC 2023


On Wed, 14 Jun 2023 07:03:14 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Vladimir Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Address Christian comments
>
> test/hotspot/jtreg/compiler/c2/irTests/TestPadding.java line 50:
> 
>> 48:             test(i);
>> 49:             tpf.b1++; // to take both branches in test()
>> 50:         }
> 
> `test_runner()` will be invoked 2000 times (default warm-up) before the explicit compilation request of `test()` by the IR framework. So, this loop will run 2000 * 11000 times. Do you need that many iterations or can the loop be removed such that we only have 2000 warm-up iterations? I.e. something like:
> 
>     @Run(test = "test")
>     public static void test_runner() {
>         tpf = new TestPadding();
>         test(42);
>         tpf.b1++; // to take both branches in test()
> 
>     }
> 
> If you need more iterations, you could still specify `@Warmup(12345)` at `test_runner()` to get more profiling in before compilation of `test()`.

Thank you, Christian. I updated the test as you suggested and verified that generated code for `test()` stay the same with 2000 default iterations.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14461#discussion_r1229895753


More information about the hotspot-compiler-dev mailing list