RFR: Update nmethod caching and clean up unused/duplicate methods [v3]
Andrew Dinn
adinn at openjdk.org
Thu Jun 5 13:26:17 UTC 2025
On Thu, 5 Jun 2025 02:08:50 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
>> Or we can compromise: `_codeblob_offset, _codeblob_size`
>> Stubs are also using CodeBlob. I don't get why you treat stubs differently.
>
> StubGenerator Stubs used CodeBlob, but in AOT CodeCache we don't store their CodeBlobs as we do for adapters/runtime blobs. We instead only copy the assembly code for each stub.
We don't yet store a blob because we are just archiving a couple of special case stubs. But when we rework multi-stub save and restore for each of the stubgen stub groups (initial, cont, etc) then we should probably store/retrieve the code for all stubs in a group as a complete blob.
n.b. I say probably because we have to think about the case where we have errors loading code for a given stubgen blob or where the stubs we need at runtime include code that was not embedded in the saved blob at assembly time (i.e. because of changes on the command line). In the former case we would have to invalidate the loaded blob and recreate a new blob. In the latter we would have to generate missing code into a code buffer and create a secondary blob after we finish loading+generating.
-------------
PR Review Comment: https://git.openjdk.org/leyden/pull/71#discussion_r2128811050
More information about the leyden-dev
mailing list