Skip to content

Conversation

@RealFYang
Copy link
Member

@RealFYang RealFYang commented Mar 12, 2025

As discussed in #23633 (comment), there is no need to distinuish T_BYTE and T_CHAR when calculating base offset for strings.
The reason is that the low-level character storage used for both Latin1 and UTF16 strings is always a byte array [1].
So we should always use T_BYTE for both cases. This won't make a difference on the calculated base offset for now.
But it's better to fix this for code readability purposes. Sanity tested on linux-riscv64 w/wo COH.

[1] https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/String.java#L160


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-8351839: RISC-V: Fix base offset calculation introduced in JDK-8347489 (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24006

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 12, 2025

👋 Welcome back fyang! 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 12, 2025

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

8351839: RISC-V: Fix base offset calculation introduced in JDK-8347489

Reviewed-by: mli, fjiang

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

  • a7ad414: 8351327: -XX:AOTMode=record interferes with application execution
  • 41cc049: 8350840: C2: x64 Assembler::vpcmpeqq assert: failed: XMM register should be 0-15
  • a347ecd: 8350905: Shenandoah: Releasing a WeakHandle's referent may extend its lifetime
  • 5502ce7: 8351699: Problem list com/sun/jdi/JdbStopInNotificationThreadTest.java with ZGC
  • cdf7632: 8351444: Shenandoah: Class Unloading may encounter recycled oops
  • 930455b: 8351640: Print reason for making method not entrant
  • 895f64a: 8351142: Add JFR monitor deflation and statistics events
  • db531bf: 8351881: Tidy complains about missing "alt" attribute
  • 02c850f: 8350982: -server|-client causes fatal exception on static JDK
  • 2371696: 8303770: Remove Baltimore root certificate expiring in May 2025
  • ... and 5 more: https://git.openjdk.org/jdk/compare/4be502ea38b37d5fb532b64e5b82363805bfe657...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
Copy link

openjdk bot commented Mar 12, 2025

@RealFYang 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 12, 2025
@RealFYang RealFYang marked this pull request as ready for review March 12, 2025 11:51
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 12, 2025
@mlbridge
Copy link

mlbridge bot commented Mar 12, 2025

Webrevs

Copy link

@Hamlin-Li Hamlin-Li 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 12, 2025
@RealFYang
Copy link
Member Author

Looks good.

Thanks for having a quick look.

Copy link
Member

@feilongjiang feilongjiang 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, thanks.

@RealFYang
Copy link
Member Author

looks good, thanks.

Thanks for the review!
/integrate

@openjdk
Copy link

openjdk bot commented Mar 13, 2025

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

  • 4c5956d: 8350866: [x86] Add C1 intrinsics for CRC32-C
  • 9c00331: 8330469: C2: Remove or change "PrintOpto && VerifyLoopOptimizations" as printing code condition
  • c18494d: 8351108: ImageIO.write(..) fails with exception when writing JPEG with IndexColorModel
  • 86860ca: 8346916: [REDO] align_up has potential overflow
  • a33b1f7: 8345298: RISC-V: Add riscv backend for Float16 operations - scalar
  • 6241d09: 8351861: RISC-V: add simple assert at arrays_equals_v
  • 0e7d460: 8351662: [Test] RISC-V: enable bunch of IR test
  • a7ad414: 8351327: -XX:AOTMode=record interferes with application execution
  • 41cc049: 8350840: C2: x64 Assembler::vpcmpeqq assert: failed: XMM register should be 0-15
  • a347ecd: 8350905: Shenandoah: Releasing a WeakHandle's referent may extend its lifetime
  • ... and 12 more: https://git.openjdk.org/jdk/compare/4be502ea38b37d5fb532b64e5b82363805bfe657...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 13, 2025

@RealFYang Pushed as commit 375722f.

💡 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.

3 participants