Skip to content

8264783: G1 BOT verification should not verify beyond allocation threshold #3356

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

Closed
wants to merge 1 commit into from

Conversation

tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Apr 6, 2021

The G1 BOT contains an allocation threshold which basically acts as a "last known valid entry" index for the per-region BOT (which are views on the global BOT table).

Currently G1 BOT verification actually "verifies" the BOT within a region past that BOT index.

This causes issues with young regions; actually there is already code that prevents their BOT verification. This is perfectly fine, allocations in young regions do not update the BOTs.

With JDK-8262068/PR #2760 this existing filtering of young regions (such that their BOT is not verified) does not work because there may be young regions that are not compacted (so with a BOT that have that last known valid entry at the start of the region) are still labelled as old.

This change proposes to not try to verify the BOT beyond the last known valid index (which is arguably not worth doing), which also covers the existing young filtering.

There are alternatives that may work in particular for JDK-8262068:
a) always compact young regions (which recreates the BOT)
b) create a "dummy" BOT that spans the entire part of the region containing live objects

However they were rejected by me because
option a) takes time and directly counters that optimization for no reason
option b) makes finding the start of an object within these regions slow (they are not refined when there is at least some bot)

and finally I do not think there is much point in trying to be clever about areas in the BOT that are known to not contain useful values.

Testing: tier1-3


Progress

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

Issue

  • JDK-8264783: G1 BOT verification should not verify beyond allocation threshold

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3356

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 6, 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 Apr 6, 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 Apr 6, 2021
@Hamlin-Li
Copy link

The change looks good to me.
Thanks Thomas!

@openjdk
Copy link

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

8264783: G1 BOT verification should not verify beyond allocation threshold

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

  • ecef1fc: 8264972: Unused TypeFunc declared in OptoRuntime
  • 440c34a: 8264644: Add PrintClassLoaderDataGraphAtExit to print the detailed CLD graph
  • b1ebf82: 8264358: Don't create invalid oop in method handle tracing
  • 627ad9f: 8262328: Templatize JVMFlag boilerplate access methods
  • c15680e: 8264868: Reduce inclusion of registerMap.hpp and register.hpp
  • 5784f6b: 8264948: Check for TLS extensions total length
  • 42f4d70: 8264649: runtime/InternalApi/ThreadCpuTimesDeadlock.java crash in fastdebug C2 with -XX:-UseTLAB
  • 76bd313: 8264872: Dependencies: Migrate to PerfData counters
  • 07c8ff4: 8264871: Dependencies: Miscellaneous cleanups in dependencies.cpp
  • 863feab: 8005295: Use mandated information for printing of repeating annotations
  • ... and 56 more: https://git.openjdk.java.net/jdk/compare/a611c462f938176d8fad303ec7a53191ce85c5d1...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 Apr 7, 2021
@tschatzl tschatzl marked this pull request as ready for review April 7, 2021 08:29
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 7, 2021
@mlbridge
Copy link

mlbridge bot commented Apr 7, 2021

Webrevs

@tschatzl
Copy link
Contributor Author

Thanks @Hamlin-Li @albertnetymk for your revies.

@tschatzl
Copy link
Contributor Author

/integrate

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

openjdk bot commented Apr 12, 2021

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

  • cb2806d: 8265018: [AIX] FileDispatcherImpl.c:31:10: fatal error: 'sys/mount.h' file not found
  • ecef1fc: 8264972: Unused TypeFunc declared in OptoRuntime
  • 440c34a: 8264644: Add PrintClassLoaderDataGraphAtExit to print the detailed CLD graph
  • b1ebf82: 8264358: Don't create invalid oop in method handle tracing
  • 627ad9f: 8262328: Templatize JVMFlag boilerplate access methods
  • c15680e: 8264868: Reduce inclusion of registerMap.hpp and register.hpp
  • 5784f6b: 8264948: Check for TLS extensions total length
  • 42f4d70: 8264649: runtime/InternalApi/ThreadCpuTimesDeadlock.java crash in fastdebug C2 with -XX:-UseTLAB
  • 76bd313: 8264872: Dependencies: Migrate to PerfData counters
  • 07c8ff4: 8264871: Dependencies: Miscellaneous cleanups in dependencies.cpp
  • ... and 57 more: https://git.openjdk.java.net/jdk/compare/a611c462f938176d8fad303ec7a53191ce85c5d1...master

Your commit was automatically rebased without conflicts.

Pushed as commit e604320.

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

@tschatzl tschatzl deleted the bot-fixes branch April 12, 2021 09:17
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.

3 participants