Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8349457: [leyden] Workaround Leyden problems with -XX:-TieredCompilation #32

Closed
wants to merge 5 commits into from

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Feb 5, 2025

Currently, supplying -XX:-TieredCompilation would break with Leyden workflows, because the archive-backed code cache heap would only be created if SegmentedCodeCache is enabled. With default compilation policy, this happens normally when tiered compilation is enabled, but not without it.

There are other minor peculiarities that we need to handle, which are exposed with runtime/cds + -XX:-TieredCompilation runs.

This prevents us from testing C2-only Leyden configs and studying compilation dynamics without tiered policy getting in the way.

Additional testing:

  • Ad-hoc Leyden experiments now work with -XX:-TieredCompilation: the C2-only code is being stored and loaded successfully from the CDS archive
  • runtime/cds now passes with -XX:-TieredCompilation
  • runtime/cds still passes by default (i.e. with tiered compilation)

Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed (1 review required, with at least 1 Committer)

Issue

  • JDK-8349457: [leyden] Workaround Leyden problems with -XX:-TieredCompilation (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 32

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/leyden/pull/32.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 5, 2025

👋 Welcome back shade! A progress list of the required criteria for merging this PR into premain 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 5, 2025

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

8349457: [leyden] Workaround Leyden problems with -XX:-TieredCompilation

Reviewed-by: asmehra, iveresov, vlivanov

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 no new commits pushed to the premain branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@ashu-mehra, @vnkozlov, @veresov, @iwanowww) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 5, 2025
@mlbridge
Copy link

mlbridge bot commented Feb 5, 2025

Webrevs

Copy link
Collaborator

@ashu-mehra ashu-mehra 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 5, 2025
Copy link
Collaborator

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

@veresov should look on this.

@veresov
Copy link
Collaborator

veresov commented Feb 5, 2025

@veresov should look on this.

@iwanowww wrote that particular part. I looks good to me though.

@shipilev
Copy link
Member Author

shipilev commented Feb 6, 2025

Fun perf results:

$ build/linux-x86_64-server-release/images/jdk/bin/java -Xms64m -Xmx1g -XX:+UseParallelGC \
     -XX:CacheDataStore=JavacBenchApp.cds -cp JavacBenchApp.jar JavacBenchApp 50

# --- Training with C1 and C2 (+Tiered)

# Production with C1 and C2 (+Tiered)
  Time (mean ± σ):     434.0 ms ±   8.5 ms    [User: 1506.7 ms, System: 218.4 ms]
  Range (min … max):   423.4 ms … 449.2 ms    10 runs

# Production with C2 only (-Tiered)
  Time (mean ± σ):     561.2 ms ±  12.8 ms    [User: 3578.0 ms, System: 263.2 ms]
  Range (min … max):   542.3 ms … 589.2 ms    10 runs

# --- Training with C2 only (-Tiered)

# Production with C1 and C2 (+Tiered)
  Time (mean ± σ):     408.0 ms ±   5.4 ms    [User: 1183.2 ms, System: 165.2 ms]
  Range (min … max):   401.3 ms … 421.0 ms    10 runs

# Production with C2 only (-Tiered)
  Time (mean ± σ):     482.0 ms ±  11.6 ms    [User: 1959.1 ms, System: 182.5 ms]
  Range (min … max):   467.2 ms … 508.2 ms    10 runs

@shipilev
Copy link
Member Author

shipilev commented Feb 6, 2025

Taking the rest of the week off, so feel free to integrate without me.

/integrate delegate

@openjdk openjdk bot added the delegated label Feb 6, 2025
@openjdk
Copy link

openjdk bot commented Feb 6, 2025

@shipilev Integration of this pull request has been delegated and may be completed by any project committer using the /integrate pull request command.

@shipilev
Copy link
Member Author

Current GHA failures should be fixed by #35.

Copy link
Collaborator

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

@shipilev
Copy link
Member Author

Thanks!

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Feb 11, 2025
@openjdk
Copy link

openjdk bot commented Feb 11, 2025

@shipilev
Your change (at version 6cdde25) is now ready to be sponsored by a Committer.

@vnkozlov
Copy link
Collaborator

/sponsor

@openjdk
Copy link

openjdk bot commented Feb 11, 2025

Going to push as commit 0a32077.

@openjdk openjdk bot added the integrated Pull request has been integrated label Feb 11, 2025
@openjdk openjdk bot closed this Feb 11, 2025
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Feb 11, 2025
@openjdk openjdk bot removed rfr Pull request is ready for review delegated sponsor Pull request is ready to be sponsored labels Feb 11, 2025
@openjdk
Copy link

openjdk bot commented Feb 11, 2025

@vnkozlov @shipilev Pushed as commit 0a32077.

💡 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
integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

6 participants