Integrated: Use method offset as the hash for storing nmethods
Ashutosh Mehra
asmehra at openjdk.org
Wed Aug 20 03:13:02 UTC 2025
On Wed, 13 Aug 2025 22:20:37 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Changeset: c4ffb0b2
Author: Ashutosh Mehra <asmehra at openjdk.org>
URL: https://git.openjdk.org/leyden/commit/c4ffb0b2b19af9b5a740a28b0840bca70a33b8e3
Stats: 81 lines in 4 files changed: 25 ins; 36 del; 20 mod
Use method offset as the hash for storing nmethods
Reviewed-by: kvn
-------------
PR: https://git.openjdk.org/leyden/pull/91
More information about the leyden-dev
mailing list