* [PATCH v1] perf trace: Enable ignore_missing_thread for trace
@ 2021-11-23 7:40 Gang Li
2021-11-30 15:16 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 2+ messages in thread
From: Gang Li @ 2021-11-23 7:40 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim
Cc: Gang Li, linux-perf-users, linux-kernel
perf already support ignore_missing_thread for -u/-p, but not yet
applied to `perf trace`. This patch enable ignore_missing_thread
for `perf trace`.
ref:
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
Signed-off-by: Gang Li <ligang.bdlg@bytedance.com>
---
tools/perf/builtin-trace.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 0b52e08e558e..94d62a92f1a1 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -3950,6 +3950,9 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
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 &&
evlist__add_newtp(evlist, "sched", "sched_stat_runtime", trace__sched_stat_runtime))
goto out_error_sched_stat_runtime;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] perf trace: Enable ignore_missing_thread for trace
2021-11-23 7:40 [PATCH v1] perf trace: Enable ignore_missing_thread for trace Gang Li
@ 2021-11-30 15:16 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-11-30 15:16 UTC (permalink / raw)
To: Gang Li
Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Namhyung Kim, linux-perf-users, linux-kernel
Em Tue, Nov 23, 2021 at 03:40:17PM +0800, Gang Li escreveu:
> perf already support ignore_missing_thread for -u/-p, but not yet
> applied to `perf trace`. This patch enable ignore_missing_thread
> for `perf trace`.
>
> ref:
> 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
> Signed-off-by: Gang Li <ligang.bdlg@bytedance.com>
> ---
> tools/perf/builtin-trace.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> index 0b52e08e558e..94d62a92f1a1 100644
> --- a/tools/perf/builtin-trace.c
> +++ b/tools/perf/builtin-trace.c
> @@ -3950,6 +3950,9 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
> 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 &&
> evlist__add_newtp(evlist, "sched", "sched_stat_runtime", trace__sched_stat_runtime))
> goto out_error_sched_stat_runtime;
Thanks, applied.
- Arnaldo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-30 15:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 7:40 [PATCH v1] perf trace: Enable ignore_missing_thread for trace Gang Li
2021-11-30 15:16 ` Arnaldo Carvalho de Melo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.