The sched in event might be dropped due to a full ringbuffer, so the sched out event is still useful information if that thread is going to be seen again. Call machine__findnew_thread() unconditionally as it's harmless to do it twice for the same thread.
Signed-off-by: James Clark james.clark@linaro.org --- tools/perf/util/cs-etm.c | 10 ---------- 1 file changed, 10 deletions(-)
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index 67e3e2becd0f..1e1ff6cc8a5e 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -3018,16 +3018,6 @@ static int cs_etm__process_itrace_start(struct cs_etm_auxtrace *etm, static int cs_etm__process_switch_cpu_wide(struct cs_etm_auxtrace *etm, union perf_event *event) { - bool out = event->header.misc & PERF_RECORD_MISC_SWITCH_OUT; - - /* - * SWITCH_IN events carry the next process to be switched out while - * SWITCH_OUT events carry the process to be switched in. As such - * we don't care about IN events. - */ - if (!out) - return 0; - return cs_etm__associate_tid(etm, event->context_switch.next_prev_pid, event->context_switch.next_prev_tid); }