RFR: 8270333: -XX:+VerifyStringTableAtExit should not do linear search [v2]
Ioi Lam
iklam at openjdk.java.net
Wed Jul 14 05:37:55 UTC 2021
> The implementation of `-XX:+VerifyStringTableAtExit` used a linear search to check for duplicated strings in the interned string table. This would be excessively slow if there were more than a few thousand strings.
>
> This PR uses a hashtable so we can avoid doing a linear search. The table is sized such that each bucket has 8 items on average.
>
> Since this code is executed only for verification, I added a new `java_lang_String::hash_code_noupdate(oop)` function, so we can avoid causing side effects.
Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
replace template with inline function
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/4772/files
- new: https://git.openjdk.java.net/jdk/pull/4772/files/2285cf94..cf913b1c
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4772&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4772&range=00-01
Stats: 6 lines in 2 files changed: 0 ins; 2 del; 4 mod
Patch: https://git.openjdk.java.net/jdk/pull/4772.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4772/head:pull/4772
PR: https://git.openjdk.java.net/jdk/pull/4772
More information about the hotspot-runtime-dev
mailing list