Skip to content

Optimize findOrCreateMethodSymRef for single method lookup - #24287

Merged
mpirvu merged 1 commit into
eclipse-openj9:masterfrom
AbdallahAbd05:specializeFindOrCreateMethodSymRef
Jul 9, 2026
Merged

Optimize findOrCreateMethodSymRef for single method lookup#24287
mpirvu merged 1 commit into
eclipse-openj9:masterfrom
AbdallahAbd05:specializeFindOrCreateMethodSymRef

Conversation

@AbdallahAbd05

Copy link
Copy Markdown
Contributor

I added a specialized path for the methodCount=1 case in findOrCreateMethodSymRef that instead uses getResolvedMethodForNameAndSignature() directly, avoiding the expensive allocation of TR_ResolvedMethod objects for every method in the class.

Issue: #23591
Related PRs: #24088, #24223, and eclipse-omr/omr#8293

@mpirvu
mpirvu self-requested a review July 3, 2026 23:52
@mpirvu mpirvu self-assigned this Jul 3, 2026
@mpirvu mpirvu added the comp:jit label Jul 3, 2026

@mpirvu mpirvu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. I have some small inline comments.
An alternative could have been to modify

TR::SymbolReference *TR_J9VMBase::findOrCreateMethodSymRef(TR::Compilation *comp,
    TR::ResolvedMethodSymbol *owningMethodSym, const char *classSig, const char *methodSig)

Comment thread runtime/compiler/env/VMJ9.cpp Outdated
Comment thread runtime/compiler/env/VMJ9.cpp
@AbdallahAbd05
AbdallahAbd05 force-pushed the specializeFindOrCreateMethodSymRef branch 2 times, most recently from 669a7d7 to c2bf015 Compare July 6, 2026 21:04
Comment thread runtime/compiler/env/VMJ9.cpp
Comment thread runtime/compiler/env/VMJ9.h Outdated
@AbdallahAbd05
AbdallahAbd05 force-pushed the specializeFindOrCreateMethodSymRef branch from c2bf015 to 6d1a1c6 Compare July 7, 2026 15:53
@AbdallahAbd05
AbdallahAbd05 requested a review from dsouzai as a code owner July 7, 2026 15:53

@mpirvu mpirvu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@mpirvu

mpirvu commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

jenkins test sanity all jdk25

@AbdallahAbd05

Copy link
Copy Markdown
Contributor Author

The unstable s390x_linux sanity.openjdk test is unrelated to my change, and is already documented in #22110

@mpirvu

mpirvu commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Tests have passed. Merging.

@mpirvu
mpirvu merged commit 57390fd into eclipse-openj9:master Jul 9, 2026
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants