RFR: 8298059: Linked stack watermarks don't support nesting [v3]
Patricio Chilano Mateo
pchilanomate at openjdk.org
Wed Dec 7 15:06:10 UTC 2022
On Wed, 7 Dec 2022 10:20:48 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
> > > I meant what you referred to as the target thread.
> >
> >
> > Then I do not understand the argument about the locking. If the only data structure we access belongs to the current thread, and only the current thread accesses that data structure, then no locking is needed.
>
> Essentially, what I'm saying is that indeed no locking is currently required as this is only executed on Thread::current(). But I preferred it to be thread safe to guard against potential future code where it isn't used from Thread::current(). If you prefer it, I can remove the locking and replace it with an assert that this is only ever executed from Thread::current(). That way at least such new code would blow up.
>
Adding the assert instead sounds good to me. If some future change requires it we can always add the lock at that point. But won't push so whatever you prefer.
-------------
PR: https://git.openjdk.org/jdk/pull/11530
More information about the hotspot-runtime-dev
mailing list