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

8271951: Consolidate preserved marks overflow stack in SerialGC #5022

Closed
wants to merge 2 commits into from

Conversation

rkennke
Copy link
Contributor

@rkennke rkennke commented Aug 5, 2021

In SerialGC we put preserved marks in space that we may have in the young gen, and failing that, we push it to an overflow stack. The overflow stack is actually two stacks, and replicate behavior of the in-place preserved marks. These can be consolidated.

Testing:

  • tier1
  • tier2
  • hotspot_gc

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8271951: Consolidate preserved marks overflow stack in SerialGC

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5022/head:pull/5022
$ git checkout pull/5022

Update a local copy of the PR:
$ git checkout pull/5022
$ git pull https://git.openjdk.java.net/jdk pull/5022/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5022

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5022.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Aug 5, 2021

👋 Welcome back rkennke! 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 label Aug 5, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Aug 5, 2021

@rkennke 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 label Aug 5, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Aug 5, 2021

Webrevs

Copy link
Contributor

@tschatzl tschatzl left a comment

Lgtm.

Pre-existing, and just a side note and not directly aimed at you: when looking at the change, there is the PreservedMark class in Serial GC, and PreservedMarks with its OopAndMarkWord inner class and PreservedMarksSet in shared/preservedMarks.hpp which is not perfect naming. I'll probably file an RFE to look into this.

@openjdk
Copy link

@openjdk openjdk bot commented Aug 9, 2021

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

8271951: Consolidate preserved marks overflow stack in SerialGC

Reviewed-by: tschatzl, kbarrett

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

  • ab41812: 8272576: G1: Use more accurate integer type for collection set length
  • 82b2f21: 8272579: G1: remove unnecesary null check for G1ParScanThreadStateSet::_states slots
  • 1c80f07: 8272334: com.sun.net.httpserver.HttpExchange: Improve API doc of getRequestHeaders
  • 6d3d479: 8272667: substandard error messages from the docs build
  • 73da66f: 8272318: Improve performance of HeapDumpAllTest
  • 96107e3: 8272573: Redundant unique_concrete_method_4 dependencies
  • 4d6593c: 8272124: Cgroup v1 initialization causes NullPointerException when cgroup path contains colon
  • 30b0f82: 8272626: Avoid C-style array declarations in java.*
  • e8f1219: 8271276: C2: Wrong JVM state used for receiver null check
  • 79a06df: 8272567: [IR Framework] Make AbstractInfo.getRandom() static
  • ... and 123 more: https://git.openjdk.java.net/jdk/compare/685fc3c677cd0e71ef4443214ae14c7eed355140...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 label Aug 9, 2021
@rkennke
Copy link
Contributor Author

@rkennke rkennke commented Aug 9, 2021

Lgtm.

Pre-existing, and just a side note and not directly aimed at you: when looking at the change, there is the PreservedMark class in Serial GC, and PreservedMarks with its OopAndMarkWord inner class and PreservedMarksSet in shared/preservedMarks.hpp which is not perfect naming. I'll probably file an RFE to look into this.

We might even think about using PreservedMarksSet in Serial GC, if we can allocate it in free parts of the heap. Not sure how feasible that would be though...

@tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Aug 9, 2021

Pre-existing, and just a side note and not directly aimed at you: when looking at the change, there is the PreservedMark class in Serial GC, and PreservedMarks with its OopAndMarkWord inner class and PreservedMarksSet in shared/preservedMarks.hpp which is not perfect naming. I'll probably file an RFE to look into this.

We might even think about using PreservedMarksSet in Serial GC, if we can allocate it in free parts of the heap. Not sure how feasible that would be though...

Agree. Filed JDK-8272147.

Copy link

@kimbarrett kimbarrett left a comment

Looks good. Just the question about PreservedMark::init.

@@ -199,6 +198,8 @@ class PreservedMark {
markWord _mark;

public:
PreservedMark(oop obj, markWord mark) : _obj(obj), _mark(mark) {}

void init(oop obj, markWord mark) {

Choose a reason for hiding this comment

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

Do we even need this init function anymore? Even if such an assignment is still needed, it could just use assignment from a newly constructed object, e.g. pm = PreservedMark(obj, mark);. The only place I found where it is used is preserve_marks, which can use the assignment form instead.

@rkennke
Copy link
Contributor Author

@rkennke rkennke commented Aug 19, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Aug 19, 2021

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

  • 7eccbd4: 8266519: Cleanup resolve() leftovers from BarrierSet et al
  • 9569159: 8272674: Logging missing keytab file in Krb5LoginModule
  • 51c1b9a: 8272616: Strange code in java.text.DecimalFormat#applyPattern
  • 03b5e99: 8272165: Consolidate mark_must_be_preserved() variants
  • ab41812: 8272576: G1: Use more accurate integer type for collection set length
  • 82b2f21: 8272579: G1: remove unnecesary null check for G1ParScanThreadStateSet::_states slots
  • 1c80f07: 8272334: com.sun.net.httpserver.HttpExchange: Improve API doc of getRequestHeaders
  • 6d3d479: 8272667: substandard error messages from the docs build
  • 73da66f: 8272318: Improve performance of HeapDumpAllTest
  • 96107e3: 8272573: Redundant unique_concrete_method_4 dependencies
  • ... and 127 more: https://git.openjdk.java.net/jdk/compare/685fc3c677cd0e71ef4443214ae14c7eed355140...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Aug 19, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Aug 19, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Aug 19, 2021

@rkennke Pushed as commit b40e8f0.

💡 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-gc integrated
3 participants