RFR: 8292190: [IR Framework] Remove redundant regex matching for failing counts constraints
Christian Hagedorn
chagedorn at openjdk.org
Fri Aug 12 07:47:21 UTC 2022
On Thu, 11 Aug 2022 06:46:05 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
> When checking a counts constraint, we are applying regex matching on the compilation output but only keep the count of all matches:
>
> https://github.com/openjdk/jdk/blob/37d3146cca2c40dd53fcebd9cb78595f018b3489/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/irrule/Counts.java#L92-L96
>
> If that does not match the expected count (L87) as stated in the IR rule (i.e. an IR matching failure), we reapply regex matching (L102) to get the matched output as well (used for the reporting):
>
> https://github.com/openjdk/jdk/blob/37d3146cca2c40dd53fcebd9cb78595f018b3489/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/irrule/Counts.java#L85-L89
>
> https://github.com/openjdk/jdk/blob/37d3146cca2c40dd53fcebd9cb78595f018b3489/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/irrule/Counts.java#L98-L103
>
> This is not efficient and is now merged into a single regex matching application which is especially beneficial when matching on large compilation output strings (as for example seen in Valhalla IR tests).
>
> Thanks,
> Christian
Thanks Vladimir and Roberto for your reviews!
-------------
PR: https://git.openjdk.org/jdk/pull/9831
More information about the hotspot-compiler-dev
mailing list