On Thu, Feb 04, 2021 at 02:35:36PM +0100, Dmitry Vyukov wrote: > I meant that we could restrict synchronous SIGTRAP for (1) > perf_event_open(pid != 0) and (2) disable it after exec.
Hmm, I think I finally get what you're after. And yes, multi-process or fork() based thingies are common and might well work too. disable_on_exec isn't quite right though, it needs to be something that kills the events entirely. I'll think about it.

