Skip to content

Commit

Permalink
8324050: Issue store-store barrier after re-materializing objects dur…
Browse files Browse the repository at this point in the history
…ing deoptimization

Reviewed-by: dlong, shade
  • Loading branch information
Vladimir Kozlov committed Jan 22, 2024
1 parent df370d7 commit 52523d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/hotspot/share/runtime/deoptimization.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -1603,6 +1603,10 @@ void Deoptimization::reassign_fields(frame* fr, RegisterMap* reg_map, GrowableAr
reassign_object_array_elements(fr, reg_map, sv, (objArrayOop) obj());
}
}
// These objects may escape when we return to Interpreter after deoptimization.
// We need barrier so that stores that initialize these objects can't be reordered
// with subsequent stores that make these objects accessible by other threads.
OrderAccess::storestore();
}


Expand Down

7 comments on commit 52523d3

@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 52523d3 Jan 23, 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-52523d33 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 52523d33 from the openjdk/jdk repository.

The commit being backported was authored by Vladimir Kozlov on 22 Jan 2024 and was reviewed by Dean Long and Aleksey Shipilev.

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-52523d33:backport-shipilev-52523d33
$ git checkout backport-shipilev-52523d33
# 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-52523d33

@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 52523d3 Jan 23, 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-52523d33 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 52523d33 from the openjdk/jdk repository.

The commit being backported was authored by Vladimir Kozlov on 22 Jan 2024 and was reviewed by Dean Long and Aleksey Shipilev.

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-52523d33:backport-shipilev-52523d33
$ git checkout backport-shipilev-52523d33
# 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-52523d33

@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 52523d3 Jan 24, 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 52523d33 to openjdk/jdk17u-dev due to conflicts in the following files:

  • src/hotspot/share/runtime/deoptimization.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-52523d33

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

# Backport the commit
$ git cherry-pick --no-commit 52523d33dde797bf03b15a05bb227b19b22c06be
# Resolve conflicts now

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

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

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

Hi all,

This pull request contains a backport of commit 52523d33 from the openjdk/jdk repository.

The commit being backported was authored by Vladimir Kozlov on 22 Jan 2024 and was reviewed by Dean Long and Aleksey Shipilev.

Thanks!

Please sign in to comment.