[lworld] RFR: 8374115: [lworld] test_classPrinter.cpp fails with Valhalla [v2]
Casper Norrbin
cnorrbin at openjdk.org
Thu Jan 29 13:46:10 UTC 2026
> Hi everyone,
>
> `test_classPrinter` tests `classPrinter` using regex to verify that the output matches the expected format.
> The `print_classes` test includes (among other things) printing the class details for `java.lang.Integer`.
>
> On mainline, the static fields are printed like this:
>
> Java mirror oop for java/lang/Integer: java.lang.Class
> {0x0000000efc0427a0} - klass: 'java/lang/Class' - flags:
> - ---- fields (total size 19 words):
> ...
> - ---- static fields (2):
> - public static final 'MIN_VALUE' 'I' @136 -2147483648 (0x80000000)
> - public static final 'MAX_VALUE' 'I' @140 2147483647 (0x7fffffff)
> ...
>
>
> With the Valhalla changes, the output now includes `value`:
>
> Java mirror oop for java/lang/Integer: java.lang.Class
> {0x000000069f040728} - klass: 'java/lang/Class' - flags:
> - ---- fields (total size 19 words):
> ...
> - ---- static fields (2):
> - public static final value 'MIN_VALUE' 'I' @136 -2147483648 (0x80000000)
> - public static final value 'MAX_VALUE' 'I' @140 2147483647 (0x7fffffff)
> ...
>
>
> When printing fields' access flags, we now also print `identity`/`value` depending on whether a field has identity. Most fields (including `MIN_VALUE`) do not have identity and therefore show `value`. The existing regex did not account for this new print, making the test fail. I have updated it accordingly and the test now passes again.
>
> Testing:
> - Tier 1
Casper Norrbin has updated the pull request incrementally with two additional commits since the last revision:
- alignment
- change to valhalla-only print
-------------
Changes:
- all: https://git.openjdk.org/valhalla/pull/1989/files
- new: https://git.openjdk.org/valhalla/pull/1989/files/7310c8cc..c54d8295
Webrevs:
- full: https://webrevs.openjdk.org/?repo=valhalla&pr=1989&range=01
- incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1989&range=00-01
Stats: 12 lines in 2 files changed: 8 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/valhalla/pull/1989.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1989/head:pull/1989
PR: https://git.openjdk.org/valhalla/pull/1989
More information about the valhalla-dev
mailing list