Skip to content

8351256: Improve printing of runtime call stub names in disassember output#23915

Closed
adinn wants to merge 3 commits intoopenjdk:masterfrom
adinn:JDK-8351256
Closed

8351256: Improve printing of runtime call stub names in disassember output#23915
adinn wants to merge 3 commits intoopenjdk:masterfrom
adinn:JDK-8351256

Conversation

@adinn
Copy link
Contributor

@adinn adinn commented Mar 5, 2025

Fixes printing of runtime stub call targets in disassembler listings.


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-8351256: Improve printing of runtime call stub names in disassember output (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23915

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 5, 2025

👋 Welcome back adinn! 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 Mar 5, 2025

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

8351256: Improve printing of runtime call stub names in disassember output

Reviewed-by: kvn

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 11 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 openjdk bot added the rfr Pull request is ready for review label Mar 5, 2025
@openjdk
Copy link

openjdk bot commented Mar 5, 2025

@adinn The following label will be automatically applied to this pull request:

  • hotspot-compiler

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-compiler hotspot-compiler-dev@openjdk.org label Mar 5, 2025
@mlbridge
Copy link

mlbridge bot commented Mar 5, 2025

Webrevs

@adinn
Copy link
Contributor Author

adinn commented Mar 5, 2025

Verified by eyeball:

$ java -XX:CompileCommand='print,java.lang.Object::<init>' Hello
CompileCommand: print java/lang/Object.<init> bool print = true
  . . .
Compiled method (c1) 98    1       3       java.lang.Object::<init> (1 bytes)
  . . .
  0x0000ffff670001b8:   cmp	x8, x9
  0x0000ffff670001bc:   b.eq	0x0000ffff670001d8  // b.none
 ;; 0xFFFF6E59EAC0
  0x0000ffff670001c0:   mov	x8, #0xeac0                	// #60096
                                                            ;   {runtime_call Stub::method_entry_barrier}
  0x0000ffff670001c4:   movk	x8, #0x6e59, lsl #16
  0x0000ffff670001c8:   movk	x8, #0xffff, lsl #32
  0x0000ffff670001cc:   blr	x8
  . . .

@adinn
Copy link
Contributor Author

adinn commented Mar 5, 2025

/author @vnkozlov

@openjdk
Copy link

openjdk bot commented Mar 5, 2025

@adinn
Setting overriding author to Vladimir Kozlov <kvn@openjdk.org>. When this pull request is integrated, the overriding author will be used in the commit.

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. Thank you for fast PR submission.

@openjdk openjdk bot removed the rfr Pull request is ready for review label Mar 5, 2025
@vnkozlov
Copy link
Contributor

vnkozlov commented Mar 5, 2025

👎 I can't be reviewer if I am author.

@vnkozlov
Copy link
Contributor

vnkozlov commented Mar 5, 2025

@adinn Can you add additional change to relocInfo.cpp to print call resolution blobs ?:
vnkozlov@620b99f

@vnkozlov
Copy link
Contributor

vnkozlov commented Mar 5, 2025

And one more in nmethod.cpp which fixes the issue in both, mainline and leyden.
RelocInfo::none may point to the same address as following relocation info:

         @0x000000010ec23436: 0002
relocInfo@0x000000010ec23436 [type=0(none) addr=0x000000010ec234c8 offset=8]
         @0x000000010ec23438: 3000
relocInfo@0x000000010ec23438 [type=6(runtime_call) addr=0x000000010ec234c8 offset=0] | [destination=0x000000010ec1f400] Blob::ExceptionBlob

As result the real relocation info for this address is not printed:

[Exception Handler]
  0x000000010ca8c1c8:   adrp            x8, #0x10ca85000    ;   {no_reloc}

The fix:

@@ -3550,7 +3550,10 @@ const char* nmethod::reloc_string_for(u_char* begin, u_char* end) {
   while (iter.next()) {
     have_one = true;
     switch (iter.type()) {
-        case relocInfo::none:                  return "no_reloc";
+        case relocInfo::none: {
+          // Skip it and check next
+          break;
+        }
         case relocInfo::oop_type: {
           // Get a non-resizable resource-allocated stringStream.
           // Our callees make use of (nested) ResourceMarks.

After fix:

[Exception Handler]
  0x000000010ec234c8:   adrp            x8, #0x10ec1f000    ;   {runtime_call ExceptionBlob}

@adinn
Copy link
Contributor Author

adinn commented Mar 5, 2025

/author @adinn

@openjdk
Copy link

openjdk bot commented Mar 5, 2025

@adinn
Setting overriding author to Andrew Dinn <adinn@openjdk.org>. When this pull request is integrated, the overriding author will be used in the commit.

@adinn
Copy link
Contributor Author

adinn commented Mar 5, 2025

@vnkozlov I pushed the recommended fixes for both reloc info and nmethod.

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 5, 2025
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.

Looks good.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 5, 2025
@adinn
Copy link
Contributor Author

adinn commented Mar 6, 2025

/integrate

@openjdk
Copy link

openjdk bot commented Mar 6, 2025

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

  • 7a5acb9: 8343840: Rewrite the ObjectMonitor lists
  • 40f150d: 8330936: [ubsan] exclude function BilinearInterp and ShapeSINextSpan in libawt java2d from ubsan checks
  • 649ef77: 8323158: HotSpot Style Guide should specify more include ordering
  • 5c552a9: 8349358: [JMH] Cannot access class jdk.internal.vm.ContinuationScope
  • e82031e: 8350756: C2 SuperWord Multiversioning: remove useless slow loop when the fast loop disappears
  • 3626ac3: 8204868: java/util/zip/ZipFile/TestCleaner.java still fails with "cleaner failed to clean zipfile."
  • 4bb3d81: 8351138: Running subset of gtests gets error printing result information
  • 107ee87: 8346954: [JMH] jdk.incubator.vector.MaskedLogicOpts fails due to IndexOutOfBoundsException
  • 11a37c8: 8351165: Remove unused includes from vmStructs
  • c3b4819: 8351074: Disallow null prefix and suffix in DecimalFormat
  • ... and 9 more: https://git.openjdk.org/jdk/compare/b1a21b563e3ae13fa5c409a4f0c04686c3f5b34a...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 6, 2025

@adinn Pushed as commit cfab88b.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Development

Successfully merging this pull request may close these issues.

2 participants