RFR: Use method offset as the hash for storing nmethods [v3]

Vladimir Kozlov kvn at openjdk.org
Tue Aug 19 21:36:57 UTC 2025


On Fri, 15 Aug 2025 04:40:04 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:

>> This looks good. I will test it.
>> 
>>> 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.
>> 
>> Lets do it in separate changes, this is not urgent.
>
>> Lets do it in separate changes, this is not urgent.
> 
> Ok
> 
>> Crashes in AOT tests in AOTCodeEntry::method()
> 
> Yes you are right, the AOTCodeEntry::method() would work only in production run because of SharedBaseAddress. We can fix it in two ways:
> 1. Remove the usage of method() in assembly phase and add assert in method() that it is being used in production run only. There are currently two usages of method() in assembly run, and both are for null checks.
> 2. Based on whether it is in assembly run or prod run, use `MetaspaceShared::requested_base_address()` or `SharedBasedAddress`.
> 
> I am inclined to 1 because current usage of method() in assembly phase is only for null checks which should always be false.

@ashu-mehra, when do you plan to push it?

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

PR Comment: https://git.openjdk.org/leyden/pull/91#issuecomment-3202304931


More information about the leyden-dev mailing list