Skip to content

8350716: [s390] intrinsify Thread.currentThread()#23791

Closed
offamitkumar wants to merge 2 commits intoopenjdk:masterfrom
offamitkumar:current_thread_intrinsic
Closed

8350716: [s390] intrinsify Thread.currentThread()#23791
offamitkumar wants to merge 2 commits intoopenjdk:masterfrom
offamitkumar:current_thread_intrinsic

Conversation

@offamitkumar
Copy link
Member

@offamitkumar offamitkumar commented Feb 26, 2025

s390x port for JDK-8278793


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-8350716: [s390] intrinsify Thread.currentThread() (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23791

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 26, 2025

👋 Welcome back amitkumar! 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 Feb 26, 2025

@offamitkumar 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:

8350716: [s390] intrinsify Thread.currentThread()

Reviewed-by: lucy, mdoerr

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 41 new commits pushed to the master branch:

  • d6c4be6: 8350758: G1: Use actual last prediction in accumulated survivor rate prediction too
  • 2019f44: 8343832: Enhance test summary with number of skipped tests
  • ac76d8d: 8350824: New async logging gtest StallingModePreventsDroppedMessages fails
  • eada1ea: 8350855: RISC-V: print offset by assert of patch_offset_in_conditional_branch
  • 2af76de: 8350683: Non-C2 / minimal JVM crashes in the build on ppc64 platforms
  • ab4b0ef: 8350889: GenShen: Break out of infinite loop of old GC cycles
  • 0a4c5a8: 8347804: GenShen: Crash with small GCCardSizeInBytes and small Java heap
  • f1398ec: 8350701: [JMH] test foreign.AllocFromSliceTest failed with Exception for size>1024
  • 3ae80bf: 8349766: GenShen: Bad progress after degen does not always need full gc
  • 2fd7156: 8347426: Invalid value used for enum Cell in iTypeFlow::StateVector::meet_exception
  • ... and 31 more: https://git.openjdk.org/jdk/compare/037e47112bdf2fa2324f7c58198f6d433f17d9fd...master

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 8350716 8350716: [s390] intrinsify Thread.currentThread() Feb 26, 2025
@openjdk
Copy link

openjdk bot commented Feb 26, 2025

@offamitkumar 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 the hotspot hotspot-dev@openjdk.org label Feb 26, 2025
@offamitkumar offamitkumar marked this pull request as ready for review February 26, 2025 04:24
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 26, 2025
@mlbridge
Copy link

mlbridge bot commented Feb 26, 2025

Webrevs

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Choose a reason for hiding this comment

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

LGTM.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 27, 2025
Copy link
Contributor

@RealLucy RealLucy left a comment

Choose a reason for hiding this comment

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

LGTM.
One minor comment.

}

address TemplateInterpreterGenerator::generate_currentThread() {
address entry_point = __ pc();
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest to remember the entry offset, not the entry address, just like in the generator above.
In general, it is possible that, while generating code, the allocated space gets exhausted. In that case, a new buffer is allocated and the code generated so far is copied to the new space. All remembered addresses become invalid then. Offsets are relative to the begin of the buffer and remain valid.

Afaik, this concern is not relevant when generating the interpreter. Here, the allocated space must be large enough from the beginning. Doing it right anyway would be nice. Thanks.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have updated the code. Thanks for the explanation as well :)

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Feb 28, 2025
@offamitkumar
Copy link
Member Author

I think, I need approval one more time to make the bot happy.

Copy link
Contributor

@RealLucy RealLucy left a comment

Choose a reason for hiding this comment

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

Looks even better now...

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 28, 2025
@offamitkumar
Copy link
Member Author

Thanks for the approval Lutz, Martin.

/integrate

@openjdk
Copy link

openjdk bot commented Mar 3, 2025

Going to push as commit 93c8784.
Since your change was applied there have been 53 commits pushed to the master branch:

  • d48ddfe: 8350748: VectorAPI: Method "checkMaskFromIndexSize" should be force inlined
  • 0a1eea1: 8345492: Fix -Wzero-as-null-pointer-constant warnings in adlc code
  • 157e5ad: 8350916: Remove misleading warning "Cannot dump shared archive while using shared archive"
  • 785e7b4: 8350819: Ignore core files
  • 3c72c04: 8350818: Improve OperatingSystemMXBean cpu load tests to not accept -1.0 by default
  • 6b719ee: 8348596: Update FreeType to 2.13.3
  • a87dd1a: 8347139: [macos] Test tools/jpackage/share/InOutPathTest.java failed: "execution error: Finder got an error: AppleEvent timed out."
  • c7fa499: 8350118: Simplify the layout access VarHandle
  • fb659eb: 8350915: [JMH] test SocketChannelConnectionSetup failed for 2 threads config
  • 3a7d986: 8350646: Calendar.Builder.build() Throws ArrayIndexOutOfBoundsException
  • ... and 43 more: https://git.openjdk.org/jdk/compare/037e47112bdf2fa2324f7c58198f6d433f17d9fd...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 3, 2025

@offamitkumar Pushed as commit 93c8784.

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

@offamitkumar offamitkumar deleted the current_thread_intrinsic branch March 3, 2025 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants