On Wed, Nov 21, 2018 at 04:35:34PM -0700, Andy Lutomirski wrote: > > > > I'm going to have Android's systrace and Perfetto use this approach. > > Exactly how many tools signed up to use this feature do you need? > > > >> Those people are the intended audience and the > >> best-positioned reviewers so let's hear from them? > > > > I'm writing plenty of trace analysis tools myself, so I'm part of this > > intended audience. Other tracing tool authors have told me about > > out-of-tree hacks for process atomic snapshots via ftrace events. This > > approach avoids the necessity of these more-invasive hacks. > > Would a tracepoint for pid reuse solve your problem? FWIW we've had similar problem in criu for memory snapshotting, because memory data is PID-driven and snapshots are rather discrete events. So we use task_struct::real_start_time as a second guard agains pid reuse.