Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8078725: method adjustments can be done just once for all classes involved into redefinition #2816

Closed
wants to merge 2 commits into from
Closed

8078725: method adjustments can be done just once for all classes involved into redefinition #2816

wants to merge 2 commits into from

Conversation

TheRealMDoerr
Copy link
Contributor

@TheRealMDoerr TheRealMDoerr commented Jun 26, 2024

Backport of JDK-8078725 which is a prerequisite of 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.

  1. Method* get_new_method() const already exists in 11u. Removed duplicate (2nd commit).

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8078725 needs maintainer approval

Issue

  • JDK-8078725: method adjustments can be done just once for all classes involved into redefinition (Enhancement - P3 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u-dev.git pull/2816/head:pull/2816
$ git checkout pull/2816

Update a local copy of the PR:
$ git checkout pull/2816
$ git pull https://git.openjdk.org/jdk11u-dev.git pull/2816/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2816

View PR using the GUI difftool:
$ git pr show -t 2816

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk11u-dev/pull/2816.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 26, 2024

👋 Welcome back mdoerr! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jun 26, 2024

@TheRealMDoerr This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

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

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 8 new commits pushed to the master branch:

  • f9d7601: 8328110: Allow simultaneous use of PassFailJFrame with split UI and additional windows
  • db9e313: 8236917: TestInstanceKlassSize.java fails with "The size computed by SA for java.lang.Object does not match"
  • 8578e12: 8303466: C2: failed: malformed control flow. Limit type made precise with MaxL/MinL
  • 6547a16: 8227122: [TESTBUG] Create Docker sidecar test cases
  • 25d6e19: Merge
  • 1e3e687: 8334441: Mark tests in jdk_security_infra group as manual
  • e61adf6: 8261433: Better pkcs11 performance for libpkcs11:C_EncryptInit/libpkcs11:C_DecryptInit
  • 59cd1a4: 8324755: Enable parallelism in vmTestbase/gc/gctests/LargeObjects tests

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title Backport 351280bbb8337eff6b61ce305ead2bf207370889 8078725: method adjustments can be done just once for all classes involved into redefinition Jun 26, 2024
@openjdk
Copy link

openjdk bot commented Jun 26, 2024

This backport pull request has now been updated with issue and summary from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Jun 26, 2024
@mlbridge
Copy link

mlbridge bot commented Jun 26, 2024

Webrevs

@openjdk
Copy link

openjdk bot commented Jun 26, 2024

⚠️ @TheRealMDoerr This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@TheRealMDoerr
Copy link
Contributor Author

Thanks for the review!

@TheRealMDoerr
Copy link
Contributor Author

/approval request Should get backported for parity with 11.0.25-oracle. The backport has been reviewed and tier 1-4 have passed.

@openjdk
Copy link

openjdk bot commented Jun 27, 2024

@TheRealMDoerr
8078725: The approval request has been created successfully.

@openjdk openjdk bot added approval ready Pull request is ready to be integrated and removed approval labels Jun 27, 2024
@TheRealMDoerr
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 28, 2024

Going to push as commit 2a5a4d7.
Since your change was applied there have been 9 commits pushed to the master branch:

  • 3702e90: 8276036: The value of full_count in the message of insufficient codecache is wrong
  • f9d7601: 8328110: Allow simultaneous use of PassFailJFrame with split UI and additional windows
  • db9e313: 8236917: TestInstanceKlassSize.java fails with "The size computed by SA for java.lang.Object does not match"
  • 8578e12: 8303466: C2: failed: malformed control flow. Limit type made precise with MaxL/MinL
  • 6547a16: 8227122: [TESTBUG] Create Docker sidecar test cases
  • 25d6e19: Merge
  • 1e3e687: 8334441: Mark tests in jdk_security_infra group as manual
  • e61adf6: 8261433: Better pkcs11 performance for libpkcs11:C_EncryptInit/libpkcs11:C_DecryptInit
  • 59cd1a4: 8324755: Enable parallelism in vmTestbase/gc/gctests/LargeObjects tests

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 28, 2024
@openjdk openjdk bot closed this Jun 28, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 28, 2024
@openjdk
Copy link

openjdk bot commented Jun 28, 2024

@TheRealMDoerr Pushed as commit 2a5a4d7.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@TheRealMDoerr TheRealMDoerr deleted the 8078725_class_redefinition branch June 28, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants