RFR: 8327990: [macosx-aarch64] Various tests fail with -XX:+AssertWXAtThreadSync [v3]

Andrew Haley aph at openjdk.org
Tue Mar 19 20:30:27 UTC 2024


On Tue, 19 Mar 2024 15:17:50 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> > Not necessarily. It may well remove some transitions from paths that don't need it, but if you move the state change too low down the call chain you could end up transitioning much more often in code that does need it e.g. if a transitioning method is called in a loop.
> 
> Not if you do the switching lazily. The first iteration would switch to the needed state; subsequent iterations would not do anything since the state already matches. Unless you interleave writes and execs, but then you would need the state changes anyway.

Exactly. You do the transition when it's needed.

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

PR Comment: https://git.openjdk.org/jdk/pull/18238#issuecomment-2008070652


More information about the serviceability-dev mailing list