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

8328792: Parallel: Refactor PSParallelCompact::summary_phase #18451

Closed

Conversation

albertnetymk
Copy link
Member

@albertnetymk albertnetymk commented Mar 22, 2024

The diff is not easy to follow; it's better to read the new code directly. summary_phase contains the gist of collecting live-size from each space, calculating dense-prefix and summarizing old-space using dense-prefix.

(There is slight improvement to the "Summary Phase", but it takes only ~0.01ms for either case.)


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-8328792: Parallel: Refactor PSParallelCompact::summary_phase (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18451

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 22, 2024

👋 Welcome back ayang! 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 22, 2024

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

8328792: Parallel: Refactor PSParallelCompact::summary_phase

Reviewed-by: iwalulya, tschatzl

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

  • 60d88b7: 8330176: Typo in Linker javadoc
  • 3f1d9c4: 8329257: AIX: Switch HOTSPOT_TOOLCHAIN_TYPE from xlc to gcc
  • 5404b4e: 8330105: SharedRuntime::resolve* should respect interpreter-only mode
  • d22d560: 8329864: TestLibGraal.java still crashes with assert(_stack_base != nullptr)
  • bc1a1a5: 8330064: JFR: Incorrect function declarations for register/unregister_stack_filter
  • b486709: 8328480: C2: SubTypeCheckNode in checkcast should use the klass constant of a unique concrete sub class
  • 1abb826: 8330131: Problemlist serviceability/jvmti/vthread/GetThreadStateMountedTest/GetThreadStateMountedTest.java
  • c1c99a6: 8329674: JvmtiEnvThreadState::reset_current_location function should use JvmtiHandshake
  • b9ef9f6: 8330185: Potential uncaught unsafe memory copy exception
  • 28b2019: 8240343: JDI stopListening/stoplis001 "FAILED: listening is successfully stopped without starting listening"
  • ... and 44 more: https://git.openjdk.org/jdk/compare/bea9acc55a7b0463a1b0b4dcb557f8ea17d8fe8c...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 changed the title 8328792 8328792: Parallel: Refactor PSParallelCompact::summary_phase Mar 22, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 22, 2024
@openjdk
Copy link

openjdk bot commented Mar 22, 2024

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

  • hotspot-gc

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-gc hotspot-gc-dev@openjdk.org label Mar 22, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 22, 2024

Webrevs

@openjdk
Copy link

openjdk bot commented Mar 25, 2024

@albertnetymk Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@openjdk
Copy link

openjdk bot commented Mar 27, 2024

@albertnetymk Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@openjdk
Copy link

openjdk bot commented Apr 2, 2024

@albertnetymk Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@openjdk
Copy link

openjdk bot commented Apr 3, 2024

@albertnetymk Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@openjdk
Copy link

openjdk bot commented Apr 5, 2024

@albertnetymk Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@openjdk
Copy link

openjdk bot commented Apr 8, 2024

@albertnetymk Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@openjdk
Copy link

openjdk bot commented Apr 9, 2024

@albertnetymk Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@openjdk
Copy link

openjdk bot commented Apr 10, 2024

@albertnetymk Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

old_space_total_live += pointer_delta(_space_info[id].new_top(),
_space_info[id].space()->bottom());
if (maximum_compaction || is_old_gen_overflowing || is_interval_ended || is_region_full) {
_maximum_compaction_gc_num = total_invocations;
Copy link
Member

@walulyai walulyai Apr 10, 2024

Choose a reason for hiding this comment

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

Based on the function name, we don't expect it to do more than reassess_maximum_compaction, additionally this modification also requires that we call reassess_maximum_compaction even when maximum_compaction is already true. Is is possible to decouple these two: reassess_maximum_compaction and _maximum_compaction_gc_num = total_invocations?

Copy link
Member Author

Choose a reason for hiding this comment

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

_maximum_compaction_gc_num is on the same abstraction level as the checking denoted as "JVM flags". Separating them will probably make code harder to follow.

Copy link
Member

Choose a reason for hiding this comment

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

Not sure I agree, but it is a minor issue, not a blocker.

LGTM!

Copy link
Contributor

Choose a reason for hiding this comment

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

I also somewhat agree that changing _maximum_compaction_gc_num seems unexpected.

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

@tschatzl tschatzl left a comment

Choose a reason for hiding this comment

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

Ok.

old_space_total_live += pointer_delta(_space_info[id].new_top(),
_space_info[id].space()->bottom());
if (maximum_compaction || is_old_gen_overflowing || is_interval_ended || is_region_full) {
_maximum_compaction_gc_num = total_invocations;
Copy link
Contributor

Choose a reason for hiding this comment

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

I also somewhat agree that changing _maximum_compaction_gc_num seems unexpected.

@albertnetymk
Copy link
Member Author

We can revisit around _maximum_compaction_gc_num after further cleanups in this area.

Thanks for review.

/integrate

@openjdk
Copy link

openjdk bot commented Apr 15, 2024

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

  • a3fecdb: 8329764: G1: Handle null references during verification first
  • 60d88b7: 8330176: Typo in Linker javadoc
  • 3f1d9c4: 8329257: AIX: Switch HOTSPOT_TOOLCHAIN_TYPE from xlc to gcc
  • 5404b4e: 8330105: SharedRuntime::resolve* should respect interpreter-only mode
  • d22d560: 8329864: TestLibGraal.java still crashes with assert(_stack_base != nullptr)
  • bc1a1a5: 8330064: JFR: Incorrect function declarations for register/unregister_stack_filter
  • b486709: 8328480: C2: SubTypeCheckNode in checkcast should use the klass constant of a unique concrete sub class
  • 1abb826: 8330131: Problemlist serviceability/jvmti/vthread/GetThreadStateMountedTest/GetThreadStateMountedTest.java
  • c1c99a6: 8329674: JvmtiEnvThreadState::reset_current_location function should use JvmtiHandshake
  • b9ef9f6: 8330185: Potential uncaught unsafe memory copy exception
  • ... and 45 more: https://git.openjdk.org/jdk/compare/bea9acc55a7b0463a1b0b4dcb557f8ea17d8fe8c...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Apr 15, 2024

@albertnetymk Pushed as commit 273df62.

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

@albertnetymk albertnetymk deleted the pgc-compute-dense-prefix branch April 15, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants