RFR: Update nmethod caching and clean up unused/duplicate methods [v9]
Vladimir Kozlov
kvn at openjdk.org
Mon Jun 16 19:57:43 UTC 2025
On Mon, 16 Jun 2025 13:28:11 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
>> This PR updates nmethod caching to be based on caching of CodeBlob. It also cleans up some dead code and duplicate methods.
>
> Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:
>
> Address ADinn's review comment
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
I will run
> > It seems work. We only loosing statistic output from AOTCodeClose::close(). We actually should not do it there. There is separate path for printing statistic print_statistics() on VM exit which will call AOT code statistics.
>
> I am not sure I get your point here. Did you mean we can avoid calling AOTCodeCache::close() on VM exit?
Yes. I am testing it now. I am talking about this call: [java.cpp#L557](https://github.com/openjdk/leyden/blob/premain/src/hotspot/share/runtime/java.cpp#L557). We should only close it when we dumping (may be not even then - just mark it as closed).
Unless I'm missing/forgetting something. That is why I run testing.
Hmm, are you suggesting to not do `delete _cache; _cache = nullptr;` only but still call `AOTCodeCache::close()` ?
And call `finish_write()` from it directly.
-------------
PR Comment: https://git.openjdk.org/leyden/pull/71#issuecomment-2977913902
PR Comment: https://git.openjdk.org/leyden/pull/71#issuecomment-2977920549
More information about the leyden-dev
mailing list