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

8290177: Improve documentation in G1MMUTracker #9471

Conversation

tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Jul 12, 2022

Hi all,

please review this change to improve the naming and documentation in G1MMUTracker::when_sec. Recently we have been looking at some young gen sizing issues (for another time), and it took some time to understand what the code does and how it works. This is kind of the result of this internal discussion, but I'm open to improve this further.

Testing: gha

Thanks,
Thomas


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9471/head:pull/9471
$ git checkout pull/9471

Update a local copy of the PR:
$ git checkout pull/9471
$ git pull https://git.openjdk.org/jdk pull/9471/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9471

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9471.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 12, 2022

👋 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 openjdk bot changed the title 8290177 8290177: Improve documentation in G1MMUTracker Jul 12, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 12, 2022
@openjdk
Copy link

openjdk bot commented Jul 12, 2022

@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 Jul 12, 2022
@mlbridge
Copy link

mlbridge bot commented Jul 12, 2022

Webrevs

Copy link
Member

@walulyai walulyai 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 Jul 13, 2022

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

8290177: Improve documentation in G1MMUTracker

Reviewed-by: iwalulya, 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 69 new commits pushed to the master branch:

  • c7c2066: 8290221: G1: Merge multiple calls of get_next_marked_addr in HeapRegion::oops_on_memregion_iterate_in_unparsable
  • be58cbc: 8290269: gc/shenandoah/TestVerifyJCStress.java fails due to invalid tag: required after JDK-8290023
  • 109e21a: 8290080: G1: Remove unnecessary is-obj-dead check in HeapRegion::do_oops_on_memregion_in_humongous
  • adf40d2: 8290149: java/nio/file/Files/probeContentType/Basic.java fails on Windows Server 2019/2022
  • 292d909: 8290178: failure_handler: run netstat without name lookups
  • a7f8358: Merge
  • ce36f6e: 8290203: ProblemList vmTestbase/nsk/jvmti/scenarios/capability/CM03/cm03t001/TestDescription.java on linux-all
  • fff7f35: 8290201: ProblemList com/sun/jdi/InvokeHangTest.java on macosx-x64 in vthread mode
  • 128c6c6: 8290095: java/nio/channels/FileChannel/largeMemory/LargeGatheringWrite.java timed out
  • 59d0c73: 8289930: Improve Thread description of inherited AccessControlContext
  • ... and 59 more: https://git.openjdk.org/jdk/compare/0225eb434cb8792d362923bf2c2e3607be4efcb9...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 Jul 13, 2022
Copy link
Member

@albertnetymk albertnetymk left a comment

Choose a reason for hiding this comment

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

Some minor comments.

@@ -56,9 +56,9 @@ void G1MMUTracker::remove_expired_entries(double current_time) {
guarantee(_no_entries == 0, "should have no entries in the array");
}

double G1MMUTracker::calculate_gc_time(double current_time) {
double G1MMUTracker::calculate_gc_time(double time_stamp) {
Copy link
Member

Choose a reason for hiding this comment

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

I think current_timestamp reads better; in this file/context X_time is (often) used to mean a duration. Keeping the current prefix helps also; from the callee's perspective, the arg represents "now".


public:
G1MMUTracker(double time_slice, double max_gc_time);

void add_pause(double start, double end);

// Determines how many seconds relative to current_time a pause of pause_time length
// would fit the MMU.
Copy link
Member

Choose a reason for hiding this comment

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

What I have in mind is sth like "Distance to the upcoming earliest possible GC pause without violating the MMU constraint. The return value is measured in seconds."

@tschatzl
Copy link
Contributor Author

Thanks for your reviews
/integrate

@openjdk
Copy link

openjdk bot commented Jul 14, 2022

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

  • 890bced: 8290264: java/util/concurrent/locks/Lock/OOMEInAQS.java fails with "exit code: 0"
  • 3ad3950: Merge
  • fd89ab8: 8288112: C2: Error: ShouldNotReachHere() in Type::typerr()
  • 2bf6285: 8290209: jcup.md missing additional text
  • 73b83e0: 8290207: Missing notice in dom.md
  • 3bb2dc8: 8290290: Remove addition of TimeInstants
  • c7c2066: 8290221: G1: Merge multiple calls of get_next_marked_addr in HeapRegion::oops_on_memregion_iterate_in_unparsable
  • be58cbc: 8290269: gc/shenandoah/TestVerifyJCStress.java fails due to invalid tag: required after JDK-8290023
  • 109e21a: 8290080: G1: Remove unnecessary is-obj-dead check in HeapRegion::do_oops_on_memregion_in_humongous
  • adf40d2: 8290149: java/nio/file/Files/probeContentType/Basic.java fails on Windows Server 2019/2022
  • ... and 65 more: https://git.openjdk.org/jdk/compare/0225eb434cb8792d362923bf2c2e3607be4efcb9...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 14, 2022
@openjdk openjdk bot closed this Jul 14, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jul 14, 2022
@openjdk
Copy link

openjdk bot commented Jul 14, 2022

@tschatzl Pushed as commit 757a742.

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

@tschatzl tschatzl deleted the submit/8290177-mmu-documentation-improvement branch August 1, 2022 10:31
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
3 participants