Integrated: 8285965: TestScenarios.java does not check for "<!-- safepoint while printing -->" correctly

Christian Hagedorn chagedorn at openjdk.java.net
Wed Jun 8 10:45:33 UTC 2022


On Wed, 11 May 2022 06:13:12 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

> This is another rare occurrence of `` that is not handled correctly by `TestScenarios.java`. 
> 
> We wrongly search this safepoint message in the test VM output with `getTestVMOutput()`:
> 
> https://github.com/openjdk/jdk/blob/9c2548414c71b4caaad6ad9e1b122f474e705300/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/Utils.java#L44-L53
> 
> But this does not help since the IR matcher is parsing the `hotspot_pid` file for IR matching and not the test VM output. We could therefore find this safepoint message in the `hotspod_pid` file and bail out of IR matching while the test VM output does not contain it. This lets `TestScenarios.java` fail. 
> 
> The fix we did for other IR framework tests is to redirect the output of the JTreg test VM itself to a stream in order to search it for ``. We are dumping this message as part of a warning when the IR matcher bails out:
> 
> https://github.com/openjdk/jdk/blob/9c2548414c71b4caaad6ad9e1b122f474e705300/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/IRMatcher.java#L86-L96
> 
> Output for the reported failure:
> 
> Scenario #3 - [-XX:TLABRefillWasteFraction=53]:
> [...]
> Found , bail out of IR matching
> 
> 
> I suggest to use the same fix for `TestScenarios`.
> 
> Thanks,
> Christian

This pull request has now been integrated.

Changeset: 6e3e470d
Author:    Christian Hagedorn <chagedorn at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/6e3e470dac80d3b6c3a0f4845ce4115858178dd3
Stats:     38 lines in 2 files changed: 11 ins; 16 del; 11 mod

8285965: TestScenarios.java does not check for "<!-- safepoint while printing -->" correctly

Reviewed-by: thartmann, kvn

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

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


More information about the hotspot-compiler-dev mailing list