RFR: 8352869: Verify.checkEQ: extension for NaN, VectorAPI and arbitrary Objects [v5]

Galder Zamarreño galder at openjdk.org
Mon Mar 31 09:32:09 UTC 2025


On Mon, 31 Mar 2025 08:57:33 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> We should extend the functionality of Verify.checkEQ:
>> - Allow different NaN encodings to be seen as equal (by default).
>> - Compare VectorAPI vectors.
>> - Compare Exceptions, and their messages.
>> - Compare arbitrary Objects via Reflection.
>> 
>> Note: this is a prerequisite for the Template Library [JDK-8352861](https://bugs.openjdk.org/browse/JDK-8352861) / https://github.com/openjdk/jdk/pull/23418.
>
> Emanuel Peter has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
> 
>  - Merge branch 'master' into JDK-8352869-Verify-NaN-Vector-Objects
>  - Verify.Options refactor for Galder
>  - Update test/hotspot/jtreg/compiler/lib/verify/Verify.java
>    
>    Co-authored-by: Galder Zamarreño <galder at redhat.com>
>  - Merge branch 'master' into JDK-8352869-Verify-NaN-Vector-Objects
>  - clean up test
>  - JDK-8352869

Changes requested by galder (Author).

test/hotspot/jtreg/compiler/lib/verify/Verify.java line 297:

> 295:     private void checkEQimpl(float a, float b, String field, Object aParent, Object bParent) {
> 296:         if (isFloatEQ(a, b)) {
> 297:             System.err.println("ERROR: Verify.checkEQ failed: value mismatch. check raw: " + verifyOptions.isFloatCheckWithRawBits);

I meant using JEP 378 text blocks, e.g.

Suggestion:

System.err.printf("""
    ERROR: Verify.checkEQ failed: value mismatch. check raw: %b
      Values: %.1f vs %.1f
      Raw:    %d vs %d
    """, isFloatCheckWithRawBits, a, b, Float.floatToRawIntBits(a), Float.floatToRawIntBits(b));

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

PR Review: https://git.openjdk.org/jdk/pull/24224#pullrequestreview-2728707044
PR Review Comment: https://git.openjdk.org/jdk/pull/24224#discussion_r2020697026


More information about the hotspot-compiler-dev mailing list