Skip to content

Commit

Permalink
8329570: G1: Excessive is_obj_dead_cond calls in verification
Browse files Browse the repository at this point in the history
Reviewed-by: aboldtch, shade, tschatzl, gli
  • Loading branch information
stefank committed Apr 5, 2024
1 parent 27353ad commit 29992e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/g1HeapRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,6 @@ class G1VerifyLiveAndRemSetClosure : public BasicOopIterateClosure {
template <class T>
void do_oop_work(T* p) {
assert(_containing_obj != nullptr, "must be");
assert(!G1CollectedHeap::heap()->is_obj_dead_cond(_containing_obj, _vo), "Precondition");

if (num_failures() >= G1MaxVerifyFailures) {
return;
Expand Down Expand Up @@ -624,6 +623,7 @@ class G1VerifyLiveAndRemSetClosure : public BasicOopIterateClosure {
_num_failures(0) { }

void set_containing_obj(oop const obj) {
assert(!G1CollectedHeap::heap()->is_obj_dead_cond(obj, _vo), "Precondition");
_containing_obj = obj;
}

Expand Down

7 comments on commit 29992e1

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@shipilev
Copy link
Member

Choose a reason for hiding this comment

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

/backport jdk22u

@openjdk
Copy link

@openjdk openjdk bot commented on 29992e1 Apr 8, 2024

Choose a reason for hiding this comment

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

@shipilev the backport was successfully created on the branch backport-shipilev-29992e1f in my personal fork of openjdk/jdk22u. To create a pull request with this backport targeting openjdk/jdk22u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 29992e1f from the openjdk/jdk repository.

The commit being backported was authored by Stefan Karlsson on 5 Apr 2024 and was reviewed by Axel Boldt-Christmas, Aleksey Shipilev, Thomas Schatzl and Guoxiong Li.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk22u:

$ git fetch https://github.com/openjdk-bots/jdk22u.git backport-shipilev-29992e1f:backport-shipilev-29992e1f
$ git checkout backport-shipilev-29992e1f
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk22u.git backport-shipilev-29992e1f

@shipilev
Copy link
Member

Choose a reason for hiding this comment

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

/backport jdk21u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 29992e1 Apr 8, 2024

Choose a reason for hiding this comment

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

@shipilev the backport was successfully created on the branch backport-shipilev-29992e1f in my personal fork of openjdk/jdk21u-dev. To create a pull request with this backport targeting openjdk/jdk21u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 29992e1f from the openjdk/jdk repository.

The commit being backported was authored by Stefan Karlsson on 5 Apr 2024 and was reviewed by Axel Boldt-Christmas, Aleksey Shipilev, Thomas Schatzl and Guoxiong Li.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u-dev:

$ git fetch https://github.com/openjdk-bots/jdk21u-dev.git backport-shipilev-29992e1f:backport-shipilev-29992e1f
$ git checkout backport-shipilev-29992e1f
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u-dev.git backport-shipilev-29992e1f

@shipilev
Copy link
Member

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 29992e1 Apr 8, 2024

Choose a reason for hiding this comment

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

@shipilev Could not automatically backport 29992e1f to openjdk/jdk17u-dev due to conflicts in the following files:

  • src/hotspot/share/gc/g1/g1HeapRegion.cpp

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk17u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk17u-dev.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-shipilev-29992e1f

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git 29992e1fca4faef0fe0ac453c7e78db4628d5e70

# Backport the commit
$ git cherry-pick --no-commit 29992e1fca4faef0fe0ac453c7e78db4628d5e70
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport 29992e1fca4faef0fe0ac453c7e78db4628d5e70'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk17u-dev with the title Backport 29992e1fca4faef0fe0ac453c7e78db4628d5e70.

Below you can find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 29992e1f from the openjdk/jdk repository.

The commit being backported was authored by Stefan Karlsson on 5 Apr 2024 and was reviewed by Axel Boldt-Christmas, Aleksey Shipilev, Thomas Schatzl and Guoxiong Li.

Thanks!

Please sign in to comment.