[External] : Re: A noob question about weird sequence of `*synchronization entry` in a C2 compiled code

Jaroslav Bachorík jaroslav.bachorik at datadoghq.com
Mon Feb 7 15:58:18 UTC 2022


Hi Dean,

The first thing I want to mention is that I isolated  this behaviour
to be triggered by `-XX:DebugNonSafepoints` JVM arg. When this option
is not specified I don't see the pattern at all.

I have extracted a self-contained (almost) reproducer - it is not a
single class, unfortunately, but building and running it is as simple
as executing the attached `./run.sh`
The reproducer has a weak point, though - I am not able to get the
`*synchronization entry` pattern manifesting at the same locations.
Therefore it is more of PoC than a full test case - it requires going
to the assembly print out and searching for `*synchronization entry`
manually.

The project can be found here -
https://drive.google.com/file/d/1Z6rX4NpvNpctVA3AuYfaG0Qxjd4KjrED/view?usp=sharing
It is a zipped gradle java project and the only thing it requires is a
working Java env.

Thanks!

-JB-

On Sun, Feb 6, 2022 at 6:45 AM <dean.long at oracle.com> wrote:
>
> On 2/5/22 12:58 PM, Jaroslav Bachorík wrote:
> > Is this the hard limitation of what is possible to do with the debug
> > data at this level of optimization? Are some boundaries irreversibly
> > lost here?
>
> It's quite likely you've discovered a bug that can be fixed.  If you
> could narrow it down to a self-contained test case, that would really help.
>
> dl


More information about the hotspot-compiler-dev mailing list