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

8272231 G1: Refactor G1CardSet::get_card_set to return G1CardSetHashTableValue* #5072

Closed
wants to merge 2 commits into from

Conversation

walulyai
Copy link
Member

@walulyai walulyai commented Aug 10, 2021

Hi all,

Please review this change to return G1CardSetHashTableValue* from G1CardSet::get_card_set. Consequently, we do not have to use G1CardSet::get_or_add_card_set in instances where we only need to get the table entry (such as in G1CardSet::transfer_cards_in_howl).

Testing: Tier 1-5.


Progress

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

Issue

  • JDK-8272231: G1: Refactor G1CardSet::get_card_set to return G1CardSetHashTableValue*

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5072

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 10, 2021

👋 Welcome back iwalulya! 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 Aug 10, 2021
@openjdk
Copy link

openjdk bot commented Aug 10, 2021

@walulyai 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 Aug 10, 2021
@mlbridge
Copy link

mlbridge bot commented Aug 10, 2021

Webrevs

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.

Lgtm.

@openjdk
Copy link

openjdk bot commented Aug 10, 2021

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

8272231: G1: Refactor G1CardSet::get_card_set to return G1CardSetHashTableValue*

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

  • 69cc588: 8272235: G1: update outdated code root fixup
  • 5db36ce: 8272158: SoftReference related bugs under memory pressure
  • 7a5b37b: 8272439: G1: add documentation to G1CardSetInlinePtr
  • 0209d9f: 8272461: G1: remove empty declaration of cleanup_after_scan_heap_roots
  • 36e2dda: 8272348: Update CDS tests in anticipation of JDK-8270489
  • 3f38a50: 8271203: C2: assert(iff->Opcode() == Op_If || iff->Opcode() == Op_CountedLoopEnd || iff->Opcode() == Op_RangeCheck) failed: Check this code when new subtype is added
  • 6a5241c: 8272491: Problem list javax/swing/JFrame/NSTexturedJFrame/NSTexturedJFrame.java on macos
  • 17b9350: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
  • 87d2761: 8271883: Math CopySign optimization for x86
  • 6b8b160: 8272396: mismatching debug output streams
  • ... and 62 more: https://git.openjdk.java.net/jdk/compare/38ff85c824750e7da66fd86f5bde1c4587e529c4...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 Aug 10, 2021
@@ -192,7 +192,7 @@ class G1CardSetHashTable : public CHeapObj<mtGCCardSet> {
};

class G1CardSetHashTableFound : public StackObj {
G1CardSetHashTableValue* _value;
G1CardSetHashTableValue* _value = nullptr;

Choose a reason for hiding this comment

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

Non-static data member initializers (http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2756.htm) have not (yet) been approved for use in HotSpot. Needs to be initialized in a constructor.

@@ -611,8 +609,7 @@ void G1CardSet::transfer_cards_in_howl(CardSetPtr parent_card_set,
G1CardSetHowl* howling_array = card_set_ptr<G1CardSetHowl>(parent_card_set);
Atomic::add(&howling_array->_num_entries, diff, memory_order_relaxed);

bool should_grow_table = false;
G1CardSetHashTableValue* table_entry = get_or_add_card_set(card_region, &should_grow_table);
G1CardSetHashTableValue* table_entry = get_card_set(card_region);

Choose a reason for hiding this comment

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

Maybe there should be an assert here that table_entry is non-null.

@walulyai
Copy link
Member Author

Thanks @kimbarrett and @tschatzl for the reviews!

/integrate

@openjdk
Copy link

openjdk bot commented Aug 16, 2021

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

  • 83d0e12: 8267833: Improve G1CardSetInlinePtr::add()
  • 69cc588: 8272235: G1: update outdated code root fixup
  • 5db36ce: 8272158: SoftReference related bugs under memory pressure
  • 7a5b37b: 8272439: G1: add documentation to G1CardSetInlinePtr
  • 0209d9f: 8272461: G1: remove empty declaration of cleanup_after_scan_heap_roots
  • 36e2dda: 8272348: Update CDS tests in anticipation of JDK-8270489
  • 3f38a50: 8271203: C2: assert(iff->Opcode() == Op_If || iff->Opcode() == Op_CountedLoopEnd || iff->Opcode() == Op_RangeCheck) failed: Check this code when new subtype is added
  • 6a5241c: 8272491: Problem list javax/swing/JFrame/NSTexturedJFrame/NSTexturedJFrame.java on macos
  • 17b9350: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
  • 87d2761: 8271883: Math CopySign optimization for x86
  • ... and 63 more: https://git.openjdk.java.net/jdk/compare/38ff85c824750e7da66fd86f5bde1c4587e529c4...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Aug 16, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Aug 16, 2021
@openjdk
Copy link

openjdk bot commented Aug 16, 2021

@walulyai Pushed as commit 0a03481.

💡 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 hotspot-gc-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants