On Thu, 23 Nov 2023 15:46:10 GMT, Jaroslav Bachorik <jbacho...@openjdk.org> wrote:
>> Sadly, this is not async-profiler specific. The same issue can be observed >> by JVMTI only code grabbing a stacktrace. >> What do you mean exactly by 'conditional'? Introducing a new JVM flag or >> something else? > > Ok, I see now - I could do the jmethodID maintenance only from > `purge_previous_version_list()` call, leaving the proper metaspace > deallocation untouched, therefore not adding unnecessary overhead there. I have modified the code to do jmethodID cleanup only when in `purge_previous_version_list()` - this should help with the added overhead. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16662#discussion_r1403578138