[jdk11u-dev] Integrated: 8078725: method adjustments can be done just once for all classes involved into redefinition
Martin Doerr
mdoerr at openjdk.org
Fri Jun 28 09:19:31 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).
This pull request has now been integrated.
Changeset: 2a5a4d7c
Author: Martin Doerr <mdoerr at openjdk.org>
URL: https://git.openjdk.org/jdk11u-dev/commit/2a5a4d7c551b5883e2758de881937d5c8b07da05
Stats: 163 lines in 9 files changed: 24 ins; 81 del; 58 mod
8078725: method adjustments can be done just once for all classes involved into redefinition
Walk all classes at the end of redefinition and adjust method entries and clean MethodData
Reviewed-by: mbaesken
Backport-of: 351280bbb8337eff6b61ce305ead2bf207370889
-------------
PR: https://git.openjdk.org/jdk11u-dev/pull/2816
More information about the jdk-updates-dev
mailing list