RFR: 8271471: [IR Framework] Rare occurrence of "<!-- safepoint while printing -->" in PrintIdeal/PrintOptoAssembly can let tests fail
Christian Hagedorn
chagedorn at openjdk.java.net
Tue Aug 10 08:01:08 UTC 2021
On Mon, 9 Aug 2021 06:41:45 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> I would also go with option 1). For the framework internal tests that expect and exception, couldn't you simply add something like a `hitSafepointWhilePrinting()` method to `IRViolationException` that you can use to check if verification of the exception should be skipped?
Thanks Tobias, I therefore went with option 1 and reverted the HotSpot change. The problem is when no `IRViolationException` is thrown due to the bailout in the `IRMatcher`. I directly made a check before throwing it (which is probably the same as your suggestion with `hitSafepointWhilePrinting()`). I made the internal framework tests aware the bailout by replacing "shouldNotReach" checks by `shouldHaveCaughtException` methods which check if we had this `tty` message somewhere. If not then the test fails. Normal user written IR tests just pass when an `IRViolationException` would have been thrown but the matched input contained the `tty` message.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4932
More information about the hotspot-compiler-dev
mailing list