RFR: 8309978: [x64] Fix useless padding [v2]
Christian Hagedorn
chagedorn at openjdk.org
Thu Jun 15 06:12:01 UTC 2023
On Wed, 14 Jun 2023 16:34:54 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> 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.
That looks good to me, thanks for the update!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14461#discussion_r1230479457
More information about the hotspot-compiler-dev
mailing list