Skip to content

Conversation

ashu-mehra
Copy link
Contributor

@ashu-mehra ashu-mehra commented Aug 13, 2025

This PR removes the need for having AdapterHandlerEntry for abstract methods. The check for abstract method is now done in the accessor functions in Method such as Method::get_i2c_entry().
Motivation for this change is described in the JBS issue.


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

Issue

  • JDK-8365501: Remove special AdapterHandlerEntry for abstract methods (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26764/head:pull/26764
$ git checkout pull/26764

Update a local copy of the PR:
$ git checkout pull/26764
$ git pull https://git.openjdk.org/jdk.git pull/26764/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26764

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26764.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 13, 2025

👋 Welcome back asmehra! 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 Aug 13, 2025

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

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

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

8365501: Remove special AdapterHandlerEntry for abstract methods

Reviewed-by: kvn, adinn

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 60 new commits pushed to 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
Copy link

openjdk bot commented Aug 13, 2025

@ashu-mehra The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added hotspot [email protected] rfr Pull request is ready for review labels Aug 13, 2025
@mlbridge
Copy link

mlbridge bot commented Aug 13, 2025

Webrevs

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Let me test it.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My tier1-5 testing passed

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 14, 2025
@ashu-mehra
Copy link
Contributor Author

@vnkozlov thanks for reviewing and testing it.

@ashu-mehra
Copy link
Contributor Author

@adinn can you please review it as well.

@openjdk openjdk bot added rfr Pull request is ready for review and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Aug 14, 2025
@ashu-mehra
Copy link
Contributor Author

@adinn @vnkozlov I merged the master into this PR to get the latest changes. Can you please review it again.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good.

@ashu-mehra ashu-mehra changed the title 8365501: Remove speical AdapterHandlerEntry for abstract methods 8365501: Remove special AdapterHandlerEntry for abstract methods Aug 28, 2025
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 28, 2025
@ashu-mehra
Copy link
Contributor Author

New test failure java/lang/Thread/virtual/stress/GetStackTraceALotWhenBlocking.java#id0 on macos-aarch64:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000103bf9bbc, pid=12937, tid=29447
#
# JRE version: OpenJDK Runtime Environment (26.0) (build 26-internal-ashu-mehra-eb641188b3a0c241d95292a834404958c3e4e5dd)
# Java VM: OpenJDK 64-Bit Server VM (26-internal-ashu-mehra-eb641188b3a0c241d95292a834404958c3e4e5dd, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Problematic frame:
# V  [libjvm.dylib+0x2f5bbc]  void StackChunkFrameStream<(ChunkFrames)1>::next<RegisterMap>(RegisterMap*, bool)+0xbc
#

@ashu-mehra
Copy link
Contributor Author

I haven't been able to reproduce it locally after running the test 1000 times.

@vnkozlov
Copy link
Contributor

I haven't been able to reproduce it locally after running the test 1000 times.

And I did not see such failure in our testing.

@ashu-mehra
Copy link
Contributor Author

I filed a bug for the crash https://bugs.openjdk.org/browse/JDK-8366438

@vnkozlov
Copy link
Contributor

@adinn, please review these changes.

Copy link
Contributor

@adinn adinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but I would appreciate an explanation as to why we don't need the lock.

void AdapterHandlerLibrary::initialize() {
{
ResourceMark rm;
MutexLocker mu(AdapterHandlerLibrary_lock);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we ok to drop this lock here? Was it unnecessary even before this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lock was required because AdapterHandlerLibrary::create_abstract_method_handler expected the lock to be held. Now that method is deleted, we don't need to acquire the lock.

@ashu-mehra
Copy link
Contributor Author

@vnkozlov @adinn thanks for the review. Integrating it now.

@ashu-mehra
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 2, 2025

Going to push as commit 444a8fa.
Since your change was applied there have been 78 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 2, 2025

@ashu-mehra Pushed as commit 444a8fa.

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

@ashu-mehra ashu-mehra deleted the remove-abstract_method_handler branch September 2, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot [email protected] integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants