RFR: Use method offset as the hash for storing nmethods

Ashutosh Mehra asmehra at openjdk.org
Thu Aug 14 13:53:35 UTC 2025


On Thu, 14 Aug 2025 13:49:08 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:

>> An other change could be preserving method's name in AOT cache only in debug VM for this compares. For printing we can get name from `entry->method()->name_and_sig_as_C_string()`.
>
>> As you said we can't use pointers (base could be different).
> I suggest to keep original code here.
> 
> But we should have already restored entry->method() correctly based on current runtime's base address. So method() should always be same as entry->method().

> An other change could be preserving method's name in AOT cache only in debug VM for this compares. For printing we can get name from entry->method()->name_and_sig_as_C_string().

Right, that was in my list as well. I was thinking of not storing the name at all. But I guess we can keep it for debug builds.

-------------

PR Review Comment: https://git.openjdk.org/leyden/pull/91#discussion_r2276701026


More information about the leyden-dev mailing list