Commit b4515ad6 authored by Gang Li's avatar Gang Li Committed by Arnaldo Carvalho de Melo

perf trace: Enable ignore_missing_thread for trace

perf already support ignore_missing_thread for -u/-p, but not yet
applied to `perf trace`. This patch enables ignore_missing_thread
for `perf trace`.
Signed-off-by: default avatarGang Li <ligang.bdlg@bytedance.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1481538943-21874-6-git-send-email-jolsa@kernel.org
Link: http://lkml.kernel.org/r/1513148513-6974-1-git-send-email-zhangmengting@huawei.com
Link: http://lore.kernel.org/lkml/20211123074018.11406-1-ligang.bdlg@bytedance.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 7a2e1496
...@@ -3950,6 +3950,9 @@ static int trace__run(struct trace *trace, int argc, const char **argv) ...@@ -3950,6 +3950,9 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
evlist__add(evlist, pgfault_min); evlist__add(evlist, pgfault_min);
} }
/* Enable ignoring missing threads when -u/-p option is defined. */
trace->opts.ignore_missing_thread = trace->opts.target.uid != UINT_MAX || trace->opts.target.pid;
if (trace->sched && if (trace->sched &&
evlist__add_newtp(evlist, "sched", "sched_stat_runtime", trace__sched_stat_runtime)) evlist__add_newtp(evlist, "sched", "sched_stat_runtime", trace__sched_stat_runtime))
goto out_error_sched_stat_runtime; goto out_error_sched_stat_runtime;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment