RFR: 8349088: De-virtualize Codeblob and nmethod [v8]
Dean Long
dlong at openjdk.org
Thu Feb 13 22:50:17 UTC 2025
On Thu, 13 Feb 2025 17:14:59 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Remove virtual methods from CodeBlob and nmethod to simplify saving/restoring in Leyden AOT cache. It avoids the need to patch hidden VPTR pointer to class's virtual table.
>>
>> Added C++ static asserts to make sure no virtual methods are added in a future.
>>
>> Fixed/cleaned SA code which process CodeBlob and its subclasses. Use `CodeBlob::_kind` field value to determine the type of blob.
>>
>> Tested tier1-5, hs-tier6-rt (for JFR testing), stress, xcomp
>
> Vladimir Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>
> rename SA argument
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/c1/Runtime1.java line 65:
> 63: public CodeBlob blobFor(int id) {
> 64: Address blobAddr = blobsField.getStaticFieldAddress().getAddressAt(id * VM.getVM().getAddressSize());
> 65: return VM.getVM().getCodeCache().createCodeBlobWrapper(blobAddr);
We don't need to change all the callers if we keep a 1-arg version of createCodeBlobWrapper():
public CodeBlob createCodeBlobWrapper(Address codeBlobAddr) {
return createCodeBlobWrapper(codeBlobAddr, codeBlobAddr);
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23533#discussion_r1955316582
More information about the serviceability-dev
mailing list