RFR: 8315127: CDSMapTest fails with incorrect number of oop references [v2]
Ioi Lam
iklam at openjdk.org
Fri Sep 1 22:49:07 UTC 2023
> This is a bug in the test case. The test parses patterns like this in the map file
>
>
> 0x00000000ffe00000: @@ Object (0xffe00000) java.lang.String
> - klass: 'java/lang/String' 0x0000000800010220
> - fields (3 words):
> - private 'hash' 'I' @12 0 (0x00000000)
> - private final 'coder' 'B' @16 0 (0x00)
> - private 'hashIsZero' 'Z' @17 true (0x01)
> - injected 'flags' 'B' @18 1 (0x01)
> - private final 'value' '[B' @20 0x00000000ffe00018 (0xffe00018) [B length: 0
> 0x00000000ffe00018: @@ Object (0xffe00018) [B length: 0
> - klass: {type array byte} 0x00000008000024d8
>
>
> Before this fix, the test assets that there are at least 10000 oop references (such as the `value` field in the above String). However, some JDK builds may have fewer archived heap objects, resulting in less than 10000 references (the graal build in the bug report has only 8286 references).
>
> After this fix, we check that the number of oop references is not fewer than the number of strings, as we know each string contains one oop field. This is sufficient to check that the map file contains expected output, without using a hard-coded number.
Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
@calvinccheung and @turbanoff review comments
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/15527/files
- new: https://git.openjdk.org/jdk/pull/15527/files/d0b02fdd..263c1742
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=15527&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=15527&range=00-01
Stats: 13 lines in 2 files changed: 2 ins; 3 del; 8 mod
Patch: https://git.openjdk.org/jdk/pull/15527.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15527/head:pull/15527
PR: https://git.openjdk.org/jdk/pull/15527
More information about the hotspot-runtime-dev
mailing list