RFR: 8338471: Refactor Method::get_new_method() for better NoSuchMethodError handling [v4]

Coleen Phillimore coleenp at openjdk.org
Wed Sep 18 19:03:06 UTC 2024


On Wed, 18 Sep 2024 18:35:22 GMT, Dean Long <dlong at openjdk.org> wrote:

> For CallInfo::resolved_method() and selected_method(), it seems like this could be a change in behavior if the caller allows a safepoint. Can we assert that these functions never see an old method?

These functions *do* see old methods.  The code tries to then store the result of these somewhere that's visited by redefinition before any safepoint that can make this method old again.  Whether or not we have all the required NSVs is another question, especially in the compiledIC.  I know the interpreter is correct because if the method is deleted, redefinition will clear the method entry and the interpreter will call into the runtime and the interpreter runtime will throw NSME directly.

resolved_indy_entries.method is the adapter method which can't be deleted, we could add an assert about that.

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

PR Comment: https://git.openjdk.org/jdk/pull/20874#issuecomment-2359200703


More information about the serviceability-dev mailing list