Commit 6a0b3aba authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf trace: Add "_from_option" suffix to trace__set_filter()

As we'll need that name for a new function to set filters for both
tracepoints and BPF maps for filtering pids.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-mdkck6hf3fnd21rz2766280q@git.kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 7ad92a33
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3104,7 +3104,7 @@ static int trace__set_duration(const struct option *opt, const char *str,
	return 0;
}

static int trace__set_filter_pids(const struct option *opt, const char *str,
static int trace__set_filter_pids_from_option(const struct option *opt, const char *str,
					      int unset __maybe_unused)
{
	int ret = -1;
@@ -3363,7 +3363,7 @@ int cmd_trace(int argc, const char **argv)
	OPT_STRING('t', "tid", &trace.opts.target.tid, "tid",
		    "trace events on existing thread id"),
	OPT_CALLBACK(0, "filter-pids", &trace, "CSV list of pids",
		     "pids to filter (by the kernel)", trace__set_filter_pids),
		     "pids to filter (by the kernel)", trace__set_filter_pids_from_option),
	OPT_BOOLEAN('a', "all-cpus", &trace.opts.target.system_wide,
		    "system-wide collection from all CPUs"),
	OPT_STRING('C', "cpu", &trace.opts.target.cpu_list, "cpu",