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

8277916: Gather non-strong reference count logic in a single place #6588

Closed
wants to merge 1 commit into from

Conversation

albertnetymk
Copy link
Member

@albertnetymk albertnetymk commented Nov 29, 2021

Move the logic of tracking ref-count to ReferenceProcessorPhaseTimes so that the provider of getter/setter is consistent inside ref-processing.

Test: hotspot_gc


Progress

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

Issue

  • JDK-8277916: Gather non-strong reference count logic in a single place

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6588

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Nov 29, 2021

👋 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 openjdk bot added the rfr label Nov 29, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Nov 29, 2021

@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 label Nov 29, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Nov 29, 2021

Webrevs

Copy link
Contributor

@kstefanj kstefanj left a comment

Change looks good.

I wonder if it would make sense to remove ReferenceProcessorStats and instead pass in the "phase times" to report_gc_reference_stats. What do you think? I just quickly looked at this, might missing something. Anyways, that might be better in a separate PR anyways.

@openjdk
Copy link

@openjdk openjdk bot commented Dec 2, 2021

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

8277916: Gather non-strong reference count logic in a single place

Reviewed-by: sjohanss, mli

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

  • 19ce33d: 8258512: serviceability/sa/TestJmapCore.java timed out on macOS 10.13.6
  • c93552c: 8277069: [REDO] JDK-8276743 Make openjdk build Zip Archive generation "reproducible"
  • b8ac0d2: 8276681: Additional malformed Javadoc inline tags in JDK source
  • b310f30: 8277396: [TESTBUG] In DefaultButtonModelCrashTest.java, frame is accessed from main thread
  • 15345e3: 8276661: (fs) UserDefinedFileAttributeView no longer works with long path (win)
  • 652b5f8: 8276674: Malformed Javadoc inline tags in JDK source
  • e0f1fc7: 8277358: Accelerate CRC32-C
  • 73a9654: 8276806: Use Objects.checkFromIndexSize where possible in java.base
  • 30087cc: 8275342: Change nested classes in java.prefs to static nested classes
  • 669c90e: 8278099: two sun/security/pkcs11/Signature tests failed with AssertionError
  • ... and 88 more: https://git.openjdk.java.net/jdk/compare/040b2c52d3e82048630fbd45a7db48a5e65204b7...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 Dec 2, 2021
@albertnetymk
Copy link
Member Author

@albertnetymk albertnetymk commented Dec 2, 2021

to remove ReferenceProcessorStats and instead pass in the "phase times" to report_gc_reference_stats

I explored that approach firstly. It works nicely for Serial, Parallel and G1. However, Shenandoah and ZGC don't use "phase times", so I don't see an easy way to satisfy all GCs after changing the signature of report_gc_reference_stats.

Copy link

@Hamlin-Li Hamlin-Li left a comment

Lgtm.

@kstefanj
Copy link
Contributor

@kstefanj kstefanj commented Dec 3, 2021

to remove ReferenceProcessorStats and instead pass in the "phase times" to report_gc_reference_stats

However, Shenandoah and ZGC don't use "phase times", so I don't see an easy way to satisfy all GCs after changing the signature of report_gc_reference_stats.

I was afraid something like this would stop this approach. Thanks.

Ship it!

@albertnetymk
Copy link
Member Author

@albertnetymk albertnetymk commented Dec 3, 2021

Thanks for the review.

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Dec 3, 2021

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

  • 53df9ff: 8278154: SimpleFileServer#createFileServer() should specify that the returned server is not started
  • d1cad24: 8278168: Add a few missing words to the specification of Files.mismatch
  • 45da3ae: 8278163: --with-cacerts-src variable resolved after GenerateCacerts recipe setup
  • 8907003: 8272234: Pass originating elements from Filer to JavaFileManager
  • 0fbd271: 8278115: gc/stress/gclocker/TestGCLockerWithSerial.java has duplicate -Xmx
  • bef5c7a: 8278116: runtime/modules/LoadUnloadModuleStress.java has duplicate -Xmx
  • 473ecec: 8278174: runtime/cds/appcds/LambdaWithJavaAgent.java fails with release VMs
  • 19ce33d: 8258512: serviceability/sa/TestJmapCore.java timed out on macOS 10.13.6
  • c93552c: 8277069: [REDO] JDK-8276743 Make openjdk build Zip Archive generation "reproducible"
  • b8ac0d2: 8276681: Additional malformed Javadoc inline tags in JDK source
  • ... and 95 more: https://git.openjdk.java.net/jdk/compare/040b2c52d3e82048630fbd45a7db48a5e65204b7...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Dec 3, 2021
@openjdk openjdk bot added integrated and removed ready labels Dec 3, 2021
@albertnetymk albertnetymk deleted the ref_count branch Dec 3, 2021
@openjdk openjdk bot removed the rfr label Dec 3, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Dec 3, 2021

@albertnetymk Pushed as commit e4774e6.

💡 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