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

JDK-8259983: do not use uninitialized expand_ms value in G1CollectedHeap::expand_heap_after_young_collection #2148

Closed
wants to merge 1 commit into from

Conversation

@MBaesken
Copy link
Member

@MBaesken MBaesken commented Jan 19, 2021

Currently we could run into an uninitialized value of expand_ms in G1CollectedHeap::expand_heap_after_young_collection() .
This would happen in case of an early return of bool G1CollectedHeap::expand(size_t expand_bytes, WorkGang* pretouch_workers, double* expand_time_ms) . See the special case in expand

if (is_maximal_no_gc()) {
log_debug(gc, ergo, heap)("Did not expand the heap (heap already fully expanded)");
return false;
}


Progress

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

Issue

  • JDK-8259983: do not use uninitialized expand_ms value in G1CollectedHeap::expand_heap_after_young_collection

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2148/head:pull/2148
$ git checkout pull/2148

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jan 19, 2021

👋 Welcome back mbaesken! 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 Jan 19, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jan 19, 2021

@MBaesken 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 Jan 19, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 19, 2021

Webrevs

Copy link

@kimbarrett kimbarrett left a comment

I considered suggesting instead only calling record_expand_heap_time if
expand succeeds. The underlying value is reset to 0 as part of
G1GCPhaseTimes::reset. But that assumes there aren't any time-consuming
reasons for expand to fail. So this change looks good to me.

@openjdk
Copy link

@openjdk openjdk bot commented Jan 19, 2021

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

8259983: do not use uninitialized expand_ms value in G1CollectedHeap::expand_heap_after_young_collection

Reviewed-by: kbarrett, lucy

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

  • a37cd5a: 8259859: Missing metaspace NMT memory tag
  • 33dcc00: 8132984: incorrect type for Reference.discovered
  • 3edf393: 8259978: PPC64 builds broken after JDK-8258004
  • 5d8861b: 8259995: Missing comma to separate years in copyright header
  • 5cfb36e: 8259036: Failed JfrVersionSystem invariant when VM built with -fno-elide-constructors
  • c0e9c44: 8259962: Shenandoah: task queue statistics is inconsistent after JDK-8255019
  • 82adfb3: 8134540: Much nearly duplicated code for PerfMemory support

Please see this link for an up-to-date comparison between the source branch of this pull request and 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 Jan 19, 2021
Copy link
Contributor

@RealLucy RealLucy left a comment

Looks good to me. Isn't that complicated either. :-)

@MBaesken
Copy link
Member Author

@MBaesken MBaesken commented Jan 20, 2021

/integrate

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

@openjdk openjdk bot commented Jan 20, 2021

@MBaesken Since your change was applied there have been 9 commits pushed to the master branch:

  • cf25383: Merge
  • f7b96d3: 8259796: timed CompletableFuture.get may swallow InterruptedException
  • a37cd5a: 8259859: Missing metaspace NMT memory tag
  • 33dcc00: 8132984: incorrect type for Reference.discovered
  • 3edf393: 8259978: PPC64 builds broken after JDK-8258004
  • 5d8861b: 8259995: Missing comma to separate years in copyright header
  • 5cfb36e: 8259036: Failed JfrVersionSystem invariant when VM built with -fno-elide-constructors
  • c0e9c44: 8259962: Shenandoah: task queue statistics is inconsistent after JDK-8255019
  • 82adfb3: 8134540: Much nearly duplicated code for PerfMemory support

Your commit was automatically rebased without conflicts.

Pushed as commit 9f21bb6.

💡 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
3 participants