RFR: 8348887: Create IR framework test for JDK-8347997 [v2]
Tobias Hartmann
thartmann at openjdk.org
Wed Apr 2 13:30:59 UTC 2025
On Wed, 2 Apr 2025 11:25:53 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/c2/irTests/TestContinuationPinningAndEA.java line 41:
>>
>>> 39: public class TestContinuationPinningAndEA {
>>> 40: public static void main(String[] args) {
>>> 41: TestFramework.runWithFlags("--add-modules", "java.base", "--add-exports", "java.base/jdk.internal.vm=ALL-UNNAMED");
>>
>> Why is this only needed now?
>
> I think it was already not fine. I had the all the `catch` because of the `throws` in the base example, defensively, by default (just assuming that these `throws Throwable` were there for a good reason). It hid the fact that the loading of `Continuation` failed (it's not exported). Nevertheless, I got enough for the IR check to work. I might be wrong on the reason, but my understanding, is that since it's intrinsiced, compilation can manage to produce IR and enough printing to make the check work. And I think it was really working, not just ignored: I got a test failure on the non-inlined cases before I add the `DontInline` annotation, if I remember well. But at runtime, `Continuation` class' access is checked (when loading it?), and then it throws to tell me I'm not allowed to access it.
Okay, thanks for the clarification!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24328#discussion_r2024830323
More information about the hotspot-compiler-dev
mailing list