[jdk11u-dev] RFR: 8078725: method adjustments can be done just once for all classes involved into redefinition
Martin Doerr
mdoerr at openjdk.org
Wed Jun 26 15:01:12 UTC 2024
On Wed, 26 Jun 2024 12:51:43 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
> Backport of [JDK-8078725](https://bugs.openjdk.org/browse/JDK-8078725) which is a prerequisite of [JDK-8222005](https://bugs.openjdk.org/browse/JDK-8222005). Applies almost cleanly. Manual changes:
>
> 1. Only one hunk required manual integration (1st commit):
>
>
> --- src/hotspot/share/prims/resolvedMethodTable.cpp
> +++ src/hotspot/share/prims/resolvedMethodTable.cpp
> @@ -232,12 +232,7 @@ void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
> continue;
> }
>
> - InstanceKlass* holder = old_method->method_holder();
> - Method* new_method = holder->method_with_idnum(old_method->orig_method_idnum());
> - assert(holder == new_method->method_holder(), "call after swapping redefined guts");
> - assert(new_method != NULL, "method_with_idnum() should not be NULL");
> - assert(old_method != new_method, "sanity check");
> -
> + Method* new_method = old_method->get_new_method();
> java_lang_invoke_ResolvedMethodName::set_vmtarget(mem_name, new_method);
>
> ResourceMark rm;
>
> JDK 11 code has `new_method` already declared and only needs to assign it.
>
> 2. `Method* get_new_method() const` already exists in 11u. Removed duplicate (2nd commit).
Thanks for the review!
-------------
PR Comment: https://git.openjdk.org/jdk11u-dev/pull/2816#issuecomment-2191929603
More information about the jdk-updates-dev
mailing list