RFR: Use method offset as the hash for storing nmethods [v4]
Ashutosh Mehra
asmehra at openjdk.org
Fri Aug 15 05:45:32 UTC 2025
> Currently AOTCodeEntry for nmethod uses a hash obtained from the method holder's name, method name and signature. This is not very reliable. With https://github.com/openjdk/leyden/pull/90, AOTCodeEntry is always linked to its corresponding Method, so we should be able to use the Method pointer as the hash for AOTCodeEntries for nmethod. However, the problem with pointers are not stable across runs. So instead of the pointer, we can use the offset of the Method in AOTCache. This should work because the Method is guaranteed to be in AOTCache.
> This PR updates the code to use Method offset as the hash for AOTCodeEntries for nmethods.
Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:
Use AOTCodeEntry::method() only in production run
Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
-------------
Changes:
- all: https://git.openjdk.org/leyden/pull/91/files
- new: https://git.openjdk.org/leyden/pull/91/files/22e9de8d..f67e52c3
Webrevs:
- full: https://webrevs.openjdk.org/?repo=leyden&pr=91&range=03
- incr: https://webrevs.openjdk.org/?repo=leyden&pr=91&range=02-03
Stats: 10 lines in 2 files changed: 2 ins; 3 del; 5 mod
Patch: https://git.openjdk.org/leyden/pull/91.diff
Fetch: git fetch https://git.openjdk.org/leyden.git pull/91/head:pull/91
PR: https://git.openjdk.org/leyden/pull/91
More information about the leyden-dev
mailing list