Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
/ jdk19 Public archive

8289069: Very slow C1 arraycopy jcstress tests after JDK-8279886 #72

Closed
wants to merge 2 commits into from

Conversation

veresov
Copy link

@veresov veresov commented Jun 25, 2022

I used BlockBegin::number_of_blocks() to size the bitmaps, however that is a total number of blocks. Since mark_loops() is called after every inlining (for every inlinee - no need to reanalyze the whole method), the bitmaps get progressively larger, and have to be zeroed. That makes the complexity quadratic. The solution is to appropriately size the bitmaps and keep the whole thing linear. Tests look good.


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-8289069: Very slow C1 arraycopy jcstress tests after JDK-8279886

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 72

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk19/pull/72.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 25, 2022

👋 Welcome back iveresov! 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 openjdk bot added the rfr Pull request is ready for review label Jun 25, 2022
@openjdk
Copy link

openjdk bot commented Jun 25, 2022

@veresov 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 Jun 25, 2022
@veresov veresov changed the title 8289069: Very slow C1 arraycopy jcstress tests after JDK-8279886Size bitmaps appropriately 8289069: Very slow C1 arraycopy jcstress tests after JDK-8279886 Jun 25, 2022
@mlbridge
Copy link

mlbridge bot commented Jun 25, 2022

Webrevs

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

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

Looks reasonable.

@@ -406,7 +410,9 @@ void BlockListBuilder::mark_loops() {
// a node with some loop bit set that would then propagate back and be never cleared because we would
// never go back through the original loop header. Therefore if there are any irreducible loops the bits in the states
// for these loops are going to propagate back to the root.
BitMap& loop_state = mark_loops(_bci2block->at(0), false);
BlockBegin* start = _bci2block->at(0);
Copy link
Member

Choose a reason for hiding this comment

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

There is a typo in line 408, that you might want to fix as well irriducible -> irreducible.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed. Thanks!

@openjdk
Copy link

openjdk bot commented Jun 28, 2022

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

8289069: Very slow C1 arraycopy jcstress tests after JDK-8279886

Reviewed-by: thartmann, 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 21 new commits pushed to the master branch:

  • c42b796: 8288058: Broken links on constant-values page
  • a814293: 8275784: Bogus warning generated for record with compact constructor
  • 6f9717b: 8288836: (fs) Files.writeString spec for IOException has "specified charset" when no charset is provided
  • 9048cef: 8288425: Footprint regression due MH creation when initializing StringConcatFactory
  • adbd200: 8289228: SegmentAllocator::allocateArray null handling is too lax
  • b449038: 8288445: AArch64: C2 compilation fails with guarantee(!true || (true && (shift != 0))) failed: impossible encoding
  • 2efa89a: 8289251: ProblemList java/lang/ref/OOMEInReferenceHandler.java
  • 17ef8ca: 8288524: Allow @systemProperty to appear in overview documentation
  • caa6b74: 8289240: ProblemList java/lang/reflect/callerCache/ReflectionCallerCacheTest.java in -Xcomp mode
  • 28913f4: 8289235: ProblemList vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011/TestDescription.java when run with vthread wrapper
  • ... and 11 more: https://git.openjdk.org/jdk19/compare/1f9521e6cb2f701f8712b4ec941ff1dbb45dad4e...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 ready Pull request is ready to be integrated label Jun 28, 2022
Copy link

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

@veresov
Copy link
Author

veresov commented Jun 28, 2022

Thanks for the reviews!
/integrate

@openjdk
Copy link

openjdk bot commented Jun 28, 2022

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

  • c42b796: 8288058: Broken links on constant-values page
  • a814293: 8275784: Bogus warning generated for record with compact constructor
  • 6f9717b: 8288836: (fs) Files.writeString spec for IOException has "specified charset" when no charset is provided
  • 9048cef: 8288425: Footprint regression due MH creation when initializing StringConcatFactory
  • adbd200: 8289228: SegmentAllocator::allocateArray null handling is too lax
  • b449038: 8288445: AArch64: C2 compilation fails with guarantee(!true || (true && (shift != 0))) failed: impossible encoding
  • 2efa89a: 8289251: ProblemList java/lang/ref/OOMEInReferenceHandler.java
  • 17ef8ca: 8288524: Allow @systemProperty to appear in overview documentation
  • caa6b74: 8289240: ProblemList java/lang/reflect/callerCache/ReflectionCallerCacheTest.java in -Xcomp mode
  • 28913f4: 8289235: ProblemList vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011/TestDescription.java when run with vthread wrapper
  • ... and 11 more: https://git.openjdk.org/jdk19/compare/1f9521e6cb2f701f8712b4ec941ff1dbb45dad4e...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jun 28, 2022

@veresov Pushed as commit 9b7805e.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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