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

8274927: Remove unnecessary G1ArchiveAllocator code #5861

Conversation

tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Oct 8, 2021

Hi all,

can I have reviews for this change that removes code that is fairly trivially recognizable as useless?

The _archive_allocator is always freed after use (see HeapShared::copy_closed/open_objects), so it must always be nullptr when it's accessed outside the CDS dump code.
I kept the asserts in the original places, but idk if that is really necessary.

Testing: tier1-5


Progress

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

Issue

  • JDK-8274927: Remove unnecessary G1ArchiveAllocator code

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5861

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Oct 8, 2021

👋 Welcome back tschatzl! 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 openjdk bot commented Oct 8, 2021

@tschatzl 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 Oct 8, 2021
@tschatzl tschatzl marked this pull request as ready for review Oct 8, 2021
@openjdk openjdk bot added the rfr label Oct 8, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Oct 8, 2021

Webrevs

Copy link

@kimbarrett kimbarrett left a comment

Looks good.

@openjdk
Copy link

@openjdk openjdk bot commented Oct 8, 2021

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

8274927: Remove unnecessary G1ArchiveAllocator code

Reviewed-by: kbarrett, ayang

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

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 Oct 8, 2021
Copy link
Member

@albertnetymk albertnetymk left a comment

The change looks good. Since _archive_allocator is often null, I wonder if this means the field should be moved to another place.

@tschatzl
Copy link
Contributor Author

@tschatzl tschatzl commented Oct 8, 2021

The change looks good. Since _archive_allocator is often null, I wonder if this means the field should be moved to another place.

That has been my initial reaction too when I noticed this. However there is no really good place. In a discussion with @iklam he suggested ArchiveBuilder, but before experimenting with that (it does not seem perfect either, particularly because this would require lots of ifdef-ing in builds without G1) I thought this change was good enough to stand on its own.

Thanks @albertnetymk and @kimbarrett for your reviews.

@tschatzl
Copy link
Contributor Author

@tschatzl tschatzl commented Oct 11, 2021

Thanks @albertnetymk @kimbarrett for your reviews

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Oct 11, 2021

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

  • c55dd36: 8275008: gtest build failure due to stringop-overflow warning with gcc11
  • 3edee1e: 8272723: Don't use Access API to access primitive fields
  • 49f8ce6: 8274773: [TESTBUG] UnsafeIntrinsicsTest intermittently fails on weak memory model platform
  • c032186: 8272968: AArch64: Remove redundant matching rules for commutative ops
  • a05873a: 8274952: jdk/jfr/api/consumer/TestRecordedFrameType.java failed when c1 disabled
  • 5ecc99b: 8274620: resourcehogs/serviceability/sa/TestHeapDumpForLargeArray.java is timing out
  • 2ff3977: 8275004: CDS build failure with gcc11
  • 296f853: 8274029: Remove jtreg tag manual=yesno for java/awt/print/Dialog/DialogOrient.java
  • 2c83559: 8274882: Cleanup redundant boxing in java.desktop
  • 6d1d4d5: 8268231: Aarch64: Use ldp in intrinsics for String.compareTo
  • ... and 21 more: https://git.openjdk.java.net/jdk/compare/d5ccfa2ae965a9ae0f3597b0b90d702a3e0ea558...master

Your commit was automatically rebased without conflicts.

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

@openjdk openjdk bot commented Oct 11, 2021

@tschatzl Pushed as commit aaf2401.

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

@tschatzl tschatzl deleted the submit/8274927-archive-allocator-cleanup branch Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc integrated
3 participants