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

8268390: G1 concurrent gc upgrade to full gc not working #4435

wants to merge 1 commit into from


Copy link

@kstefanj kstefanj commented Jun 9, 2021

Please review this small change to enable concurrent GCs to be upgraded to Full collections when there are no free regions.

During the review of PR #4342 it was noted that we currently never upgrade concurrent GCs (from VM_G1TryInitiateConcMark::doit()) to full collections. In should_upgrade_to_full_gc() there was a check to always return false for "concurrent" GC-causes. There is no obviously good reason for this, and this change will enable concurrent GCs to be upgraded.

This could not be included in PR #4342 because that would make us hit the same problem as reported in JDK-8195158. The fix back then was to not upgrade concurrent GCs. The approach used now, which was added by PR #4357, is to use another GC cause for upgraded GCs.

What this change does is basically just removing the should_do_concurrent_full_gc() check from should_upgrade_to_full_gc() and once that is done has_regions_left_for_allocation() might as well be folded into should_upgrade_to_full_gc()

Manual testing to verify this does not cause the assertion failure from JDK-8195158. Currently running Mach5 testing.


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


  • JDK-8268390: G1 concurrent gc upgrade to full gc not working



Using git

Checkout this PR locally:
$ git fetch pull/4435/head:pull/4435
$ git checkout pull/4435

Update a local copy of the PR:
$ git checkout pull/4435
$ git pull pull/4435/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4435

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

Using diff file

Download this PR as a diff file:

Copy link

@bridgekeeper bridgekeeper bot commented Jun 9, 2021

👋 Welcome back sjohanss! 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.

Copy link

@openjdk openjdk bot commented Jun 9, 2021

@kstefanj 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 Jun 9, 2021
@kstefanj kstefanj marked this pull request as ready for review Jun 9, 2021
@openjdk openjdk bot added the rfr label Jun 9, 2021
Copy link

@mlbridge mlbridge bot commented Jun 9, 2021


Copy link

@kimbarrett kimbarrett left a comment

Looks good.

Copy link

@openjdk openjdk bot commented Jun 9, 2021

@kstefanj This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file for details.

After integration, the commit message for the final commit will be:

8268390: G1 concurrent gc upgrade to full gc not working

Reviewed-by: kbarrett, tschatzl

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

  • d4377af: 8263303: C2 compilation fails with assert(found_sfpt) failed: no node in loop that's not input to safepoint
  • dd1cbad: 8268285: vmTestbase/nsk/jvmti/GetThreadState/thrstat002 failed with "Wrong thread "thr1" (...) state after SuspendThread"
  • ece3ae3: 8268388: Update large pages information in Java manpage
  • 2623b0b: 8268475: execute runtime/InvocationTests w/ -UseVtableBasedCHA
  • f839308: 8268407: ProblemList sun/tools/jstat/ on linux-aarch64 due to JDK-8268211
  • 58ba48b: 8268192: LambdaMetafactory with invokespecial causes VerificationError
  • b41f3f8: 8268478: JVMCI tests failing after JDK-8268052
  • 7ff6e7b: 8267954: Shared classes that failed to load should not be loaded again
  • 991ca14: 8267430: GraphicsDevice.setDisplayMode(REFRESH_RATE_UNKNOWN) throws IAE: Unable to set display mode!
  • bf29a01: 8228343: JCMD and attach fail to work across Linux Container boundary
  • ... and 7 more:

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 Jun 9, 2021
Copy link
Contributor Author

@kstefanj kstefanj commented Jun 10, 2021

Testing looks good, tier1 - tier3 + additional GC tests.

Copy link

@tschatzl tschatzl left a comment


Copy link
Contributor Author

@kstefanj kstefanj commented Jun 10, 2021

Thanks @tschatzl and @kimbarrett.


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

@openjdk openjdk bot commented Jun 10, 2021

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

  • e0c0b13: 8268534: some serviceability/jvmti tests should be run in driver mode
  • 92f0b6d: 8268532: several serviceability/attach tests should be run in driver mode
  • 964118f: 8268538: mark hotspot serviceability/logging tests which ignore external VM flags
  • 05090fc: 8268536: mark hotspot serviceability/dcmd tests which ignore external VM flags
  • ae29f9c: 8268530: resourcehogs/serviceability/jvmti/ should be run in driver mode
  • ea19b04: 8268481: Delete JAWT test files for mac
  • f271eb8: 8268303: Incorrect casts in JfrWriterHost::write for Ticks and Tickspan
  • ab01cb5: 8268339: Upstream: 8267989: Exceptions thrown during upcalls should be handled
  • 1fd8146: 8268461: ARM32: vector intrinsics reaches ShouldNotReachHere
  • 78b09ab: 8268463: Windows 32bit build fails in DynamicCodeGenerated\libDynamicCodeGenerated.cpp
  • ... and 18 more:

Your commit was automatically rebased without conflicts.

Pushed as commit f770f77.

💡 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
hotspot-gc integrated
3 participants