RFR: 8318895: Deoptimization results in incorrect lightweight locking stack

Richard Reingruber rrich at openjdk.org
Thu Nov 9 14:58:03 UTC 2023


On Wed, 8 Nov 2023 19:00:53 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> See JBS issue for details.
> 
> I basically:
>  - took the test-modification and turned it into its own test-case
>  - added test runners for lightweight- and legacy-locking, so that we keep testing both, no matter what is the default
>  - added Axels fix (mentioned in the JBS issue) with the modification to only inflate when exec_mode == Unpack_none, as explained by Richard.
> 
> Testing:
>  - [x] EATests.java
>  - [x] tier1
>  - [ ] tier2

Hi Roman,

thanks for opening the pr.

I've implemented [another test case](https://github.com/reinrich/jdk/commit/b72b3b3d7d1b5927811ae49e3ddea01d298dcb85) that demonstrates why relocking should be done before an object reference with eliminated locking is passed to a JVMTI agent. Would it be ok to include it in your pr?
([This is a version](https://github.com/reinrich/jdk/commit/f7a90c13e27e9fe38c892f069bd8d58484f59445) where relocking is delayed until the compiled frame is deoptimized. The new test fails with -XX:+UseNewCode).

I will put the change through our CI testing.

Cheers, Richard.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16568#issuecomment-1803985944


More information about the hotspot-dev mailing list