On 7/22/64 12:06 PM, Frederic Weisbecker wrote: [..] > > That and the fact there are other ways to get that callchain like taking > the one of the last sched_switch event from the waked thread. > > Perhaps we should use the sched_switch event and a post_sched_switch > event, compute the time difference as a weight and use the callchain of any of > those. Perhaps as a plugin in perf report? > > In any case that rather sounds like something that should be done in post-processing > in userspace, in perf tools. > > We should probably avoid the remote callchains, sounds like asking for complications > everywhere. Agreed on remote callchains and maintaining consistency about what the tracepoints mean. As I said on the other thread, post-processing in userspace has the issue that we collect more info than we actually need and under load, perf record can't keep up. Attached is an alternative approach that does what you allude to above. perf record -agPe sched:sched_switch --filter "delay > 1000000" -- sleep 1 allows us to collect a lot less. For some reason, "perf script" shows the correct delay field, but the sample period still contains 1 (i.e __perf_count() hint is not working for me). -Arun