On Wed, 27 Mar 2024 01:02:41 GMT, Andrei Pangin <apan...@openjdk.org> wrote:

> This fix makes `AsyncGetCallTrace` reentrant and async-signal-safe.
> Reentrancy is required in the cases when two or more profiling engines are 
> running at the same time, e.g., when CPU and Wall clock profilers work 
> together and therefore one profiler may interrupt another in the middle of 
> getting a stack trace.
> 
> Tested with async-profiler:
> 
> java 
> -agentpath:/path/to/libasyncProfiler.so=start,event=cpu,interval=1ms,wall=1ms,file=profile.jfr

I have my doubts as to whether AGCT is actually re-entrant in a general sense, 
but I can see that the `ThreadInAsgct` RAII object introduced a reentrancy 
constraint that did not exist prior, and so removing it should not make AGCT 
any less safe and should allow previous reentrancy cases to continue to work as 
before.

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18504#pullrequestreview-1966173558

Reply via email to