Skip to content

Conversation

@adinn
Copy link
Contributor

@adinn adinn commented Aug 1, 2024

Reorganization of generation and management code for C2-specific blob so that it is, as far as possible, under the scope of class OptoRuntime with an implementation located in C2-specific source files.


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-8337654: Relocate uncommon trap stub from SharedRuntime to OptoRuntime (Sub-task - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 20417

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 1, 2024

👋 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 Aug 1, 2024

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

8337654: Relocate uncommon trap stub from SharedRuntime to OptoRuntime

Reviewed-by: kvn, vlivanov, fyang

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

  • 08f697f: 8337819: Update GHA JDKs to 22.0.2
  • 42652b2: 8337787: Fix -Wzero-as-null-pointer-constant warnings when JVMTI feature is disabled
  • 807186f: 8337784: Fix simple -Wzero-as-null-pointer-constant warnings in linux/posix code
  • e68df52: 8337054: JDK 23 RDP2 L10n resource files update
  • 9856216: 8336928: GHA: Bundle artifacts removal broken
  • 219e1eb: 8337712: Wrong javadoc in java.util.Date#toString(): "61" and right parenthesis
  • 97afbd9: 8336410: runtime/NMT/TotalMallocMmapDiffTest.java Total malloc diff is incorrect. Expected malloc diff range
  • c095c0e: 8336489: Track scoped accesses in JVMCI compiled code
  • 7e925d7: 8337283: configure.log is truncated when build dir is on different filesystem
  • 2e093b0: 8337779: test/jdk/jdk/jfr/jvm/TestHiddenWait.java is a bit fragile
  • ... and 19 more: https://git.openjdk.org/jdk/compare/f174bbd3baf351ae9248b70454b3bc5a89acd7c6...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 added the rfr Pull request is ready for review label Aug 1, 2024
@openjdk
Copy link

openjdk bot commented Aug 1, 2024

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

  • graal
  • hotspot

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

@openjdk openjdk bot added graal graal-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Aug 1, 2024
@mlbridge
Copy link

mlbridge bot commented Aug 1, 2024

Webrevs

@adinn
Copy link
Contributor Author

adinn commented Aug 1, 2024

/cc hotspot-runtime

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Aug 1, 2024
@openjdk
Copy link

openjdk bot commented Aug 1, 2024

@adinn
The hotspot-runtime label was successfully added.

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.

Did you forget to add new file runtime_risc.cpp to changeset?

@adinn
Copy link
Contributor Author

adinn commented Aug 1, 2024

Did you forget to add new file runtime_risc.cpp to changeset?

Yes, apologies for that. Should be there now.

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.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 1, 2024
Copy link
Contributor

@iwanowww iwanowww 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.

// Call C code. Need thread but NOT official VM entry
// crud. We cannot block on this call, no GC can happen. Call should
// restore return values to their stack-slots with the new SP.
// Thread is in rdi already.
Copy link
Contributor

Choose a reason for hiding this comment

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

It's weird to see rdi being mentioned in AArch64-specific code :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A hangover from the existing (relocated) code going back to when it was cloned from runtime_x86_64.cpp (where the comment still exists even though it appears also to be incorrect!). I'll delete it.

@RealFYang
Copy link
Member

Hi Andrew, I think we are lacking following addon change for riscv. Built fastdebug and manually tested on linux-riscv64.

diff --git a/src/hotspot/cpu/riscv/runtime_riscv.cpp b/src/hotspot/cpu/riscv/runtime_riscv.cpp
index 46fdcc65a2c..c030441857c 100644
--- a/src/hotspot/cpu/riscv/runtime_riscv.cpp
+++ b/src/hotspot/cpu/riscv/runtime_riscv.cpp
@@ -58,7 +58,7 @@ class SimpleRuntimeFrame {
 #define __ masm->

 //------------------------------generate_uncommon_trap_blob--------------------
-void SharedRuntime::generate_uncommon_trap_blob() {
+void OptoRuntime::generate_uncommon_trap_blob() {
   // Allocate space for the code
   ResourceMark rm;
   // Setup code generation tools
@@ -122,7 +122,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
     __ lwu(t0, Address(x14, Deoptimization::UnrollBlock::unpack_kind_offset()));
     __ mv(t1, Deoptimization::Unpack_uncommon_trap);
     __ beq(t0, t1, L);
-    __ stop("SharedRuntime::generate_uncommon_trap_blob: expected Unpack_uncommon_trap");
+    __ stop("OptoRuntime::generate_uncommon_trap_blob: expected Unpack_uncommon_trap");
     __ bind(L);
   }
 #endif
@@ -377,6 +377,5 @@ void OptoRuntime::generate_exception_blob() {
   // Set exception blob
   _exception_blob =  ExceptionBlob::create(&buffer, oop_maps, SimpleRuntimeFrame::framesize >> 1);
 }
-#endif // COMPILER2
-

+#endif // COMPILER2

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Aug 2, 2024
@adinn
Copy link
Contributor Author

adinn commented Aug 2, 2024

Hi Fei (@RealFYang). Thanks for checking. I pushed a corrected version.

Copy link
Member

@RealFYang RealFYang left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 3, 2024
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Aug 5, 2024
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.

Update is good.

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

adinn commented Aug 6, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Aug 6, 2024

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

  • 1348ece: 8332120: Potential compilation failure in istream.cpp:205 - loss of data on conversion
  • ef909bd: 8335121: Native memory leak when not recording any events
  • a117945: 8337344: Redundant javadoc at RasterPrinterJob.isCancelled
  • f9b8a22: 8337798: JFR: Remove jdk/jfr/api/consumer/recordingstream/TestOnEvent.java from ProblemList.txt
  • 958786b: 8332522: SwitchBootstraps::mappedEnumLookup constructs unused array
  • f92c60e: 8337810: ProblemList BasicDirectoryModel/LoaderThreadCount.java on Windows
  • 0d8ec42: 8337642: Remove unused APIs of GCPolicyCounters
  • 2057594: 8337782: Use THROW_NULL instead of THROW_0 in pointer contexts in prims code
  • 73718fb: 8337788: RISC-V: Cleanup code in MacroAssembler::reserved_stack_check
  • 965d6b9: 8335836: serviceability/jvmti/StartPhase/AllowedFunctions/AllowedFunctions.java fails with unexpected exit code: 112
  • ... and 32 more: https://git.openjdk.org/jdk/compare/f174bbd3baf351ae9248b70454b3bc5a89acd7c6...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Aug 6, 2024

@adinn Pushed as commit ab509f1.

💡 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

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

Development

Successfully merging this pull request may close these issues.

4 participants