Skip to content

Conversation

@tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Sep 1, 2021

Hi all,

can I have reviews for this change that moves the G1 young collection algorithm containing the collection part out of G1CollectedHeap into a new G1YoungCollector class.

This change is mostly limited to moving the young collection specific code out; data structures are mostly kept in G1CollectedHeap for one reason or another, most of the time just to decrease the amount of code changes.

That will be fixed by upcoming (smaller) changes.

Other random comments:

  • I am aware that the class forward definitions in g1CollectedHeap.hpp are unsorted, but they were already and I will fix that later.
  • there will be some cleanup of G1CollecteHeap interface: at the moment, to reduce changes, I moved only code that was easy to move, and added back-references to G1CollectedHeap. There is a large list of getters for those in G1YoungCollector. These will be investigated one by one whether they can be removed by moving other code to G1YoungCollector.
  • what I would like to move is at least data like the heap region attribute table, evacuation failure temporary information and others
  • some data will likely move from G1CollectedHeap to some class that contains long term state specific to the young collection (e.g. evacuation failure injector, evacuation failure final result?, _bytes_used_during_gc, _gc_timer_stw, _gc_tracer_stw, stw reference processor and related closures)

So lots of changes ahead, but this is a significant first step to avoid me doing tricky merges over and over again.

Testing: tier1-5

Thanks,
Thomas


Progress

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

Issue

  • JDK-8253343: Extract G1 Young GC algorithm related code from G1CollectedHeap

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5333

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 1, 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 bot commented Sep 1, 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 hotspot-gc-dev@openjdk.org label Sep 1, 2021
@tschatzl tschatzl marked this pull request as ready for review September 1, 2021 15:08
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 1, 2021
@mlbridge
Copy link

mlbridge bot commented Sep 1, 2021

Webrevs

@openjdk
Copy link

openjdk bot commented Sep 2, 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:

8253343: Extract G1 Young GC algorithm related code from G1CollectedHeap

Reviewed-by: ayang, sjohanss

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

  • 44c5c23: 8272164: DumpAllocStats shouldn't subclass from ResourceObj
  • 1bf5bda: 8269418: jdk/jfr/event/oldobject/TestObjectSize.java failed with "RuntimeException: No events: expected false, was true"
  • fb5b144: 8272985: Reference discovery is confused about atomicity and degree of parallelism
  • 70ed6c5: 8272878: JEP 381 cleanup: Remove unused Solaris code in sun.font.TrueTypeGlyphMapper
  • b4e5b28: 8273221: Guard GCIdMark against nested calls
  • 4d25e6f: 8273335: compiler/blackhole tests should not run with interpreter-only VMs
  • c640fe4: 7188098: TEST_BUG: closed/javax/sound/midi/Synthesizer/Receiver/bug6186488.java fails
  • cec6c06: 8272232: javax/swing/JTable/4275046/bug4275046.java failed with "Expected value in the cell: 'rededited' but found 'redEDITED'."
  • 14a3ac0: 8271911: replay compilations of methods which use JSR292 (easy cases)
  • d414a88: 8273240: Dynamic test ArchiveConsistency.java should use CDSArchiveUtils
  • ... and 30 more: https://git.openjdk.java.net/jdk/compare/a58cf16509f3120d69fc18bd4c2c49e9ad590f73...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 Sep 2, 2021
@Hamlin-Li
Copy link

Seems g1YoungCollector.inline.hpp is an empty file and not referenced anywhere.

@tschatzl
Copy link
Contributor Author

tschatzl commented Sep 6, 2021

Seems g1YoungCollector.inline.hpp is an empty file and not referenced anywhere.

It got empty after the latest merge. Removed.

Copy link
Contributor

@kstefanj kstefanj 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 to me.

@tschatzl
Copy link
Contributor Author

tschatzl commented Sep 6, 2021

Thanks @kstefanj @albertnetymk for your reviews.

/integrate

@openjdk
Copy link

openjdk bot commented Sep 6, 2021

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

  • 44c5c23: 8272164: DumpAllocStats shouldn't subclass from ResourceObj
  • 1bf5bda: 8269418: jdk/jfr/event/oldobject/TestObjectSize.java failed with "RuntimeException: No events: expected false, was true"
  • fb5b144: 8272985: Reference discovery is confused about atomicity and degree of parallelism
  • 70ed6c5: 8272878: JEP 381 cleanup: Remove unused Solaris code in sun.font.TrueTypeGlyphMapper
  • b4e5b28: 8273221: Guard GCIdMark against nested calls
  • 4d25e6f: 8273335: compiler/blackhole tests should not run with interpreter-only VMs
  • c640fe4: 7188098: TEST_BUG: closed/javax/sound/midi/Synthesizer/Receiver/bug6186488.java fails
  • cec6c06: 8272232: javax/swing/JTable/4275046/bug4275046.java failed with "Expected value in the cell: 'rededited' but found 'redEDITED'."
  • 14a3ac0: 8271911: replay compilations of methods which use JSR292 (easy cases)
  • d414a88: 8273240: Dynamic test ArchiveConsistency.java should use CDSArchiveUtils
  • ... and 30 more: https://git.openjdk.java.net/jdk/compare/a58cf16509f3120d69fc18bd4c2c49e9ad590f73...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 6, 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 Sep 6, 2021
@openjdk
Copy link

openjdk bot commented Sep 6, 2021

@tschatzl Pushed as commit 2cabec8.

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

@tschatzl tschatzl deleted the submit/8253343-move-young-collector-to-separate-files branch September 6, 2021 14:46
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.

4 participants