RFR: 8295872: [PPC64] JfrGetCallTrace: Need pc == nullptr check before frame constructor [v2]
Martin Doerr
mdoerr at openjdk.org
Mon Oct 31 12:01:24 UTC 2022
On Mon, 31 Oct 2022 11:53:38 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
>> The check pc == nullptr is needed before the frame constructor.
>
> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove acquire barrier again. The null check is the clean fix.
I've spent more time for understanding the memory ordering aspect and I've come to the conclusion, that the acquire barrier from [JDK-8290004](https://bugs.openjdk.org/browse/JDK-8290004) is not really needed. The fields are never read while concurrently modified. They are only read by the current thread or when the thread is suspended (or stopped by a signal).
So, the pc == null check before the frame constructor is a sufficient fix for the profiling usages. An unnecessary acquire barrier may be confusing and I think a comment is helpful.
Please take a 2nd look. Thanks!
-------------
PR: https://git.openjdk.org/jdk/pull/10846
More information about the hotspot-runtime-dev
mailing list