diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-07-20 20:27:39 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-07-20 20:46:10 +0200 |
commit | 8e99b6d4533cf3f49dcd813155a513a5b572baef (patch) | |
tree | f3f082ab6d3e1916353b59e7f70735183cc72722 /tools/perf/util/callchain.c | |
parent | perf trace: Filter out 'sshd' in the tracer ancestry in syswide tracing (diff) | |
download | linux-8e99b6d4533cf3f49dcd813155a513a5b572baef.tar.xz linux-8e99b6d4533cf3f49dcd813155a513a5b572baef.zip |
tools include: Adopt strstarts() from the kernel
Replacing prefixcmp(), same purpose, inverted result, so standardize on
the kernel variant, to reduce silly differences among tools/ and the
kernel sources, making it easier for people to work in both codebases.
And then doing:
if (strstarts(option, "no-"))
Looks clearer than doing:
if (!prefixcmp(option, "no-"))
To figure out if option starts witn "no-".
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-kaei42gi7lpa8subwtv7eug8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/callchain.c')
-rw-r--r-- | tools/perf/util/callchain.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c index 22d413ae6025..02130e2e72c7 100644 --- a/tools/perf/util/callchain.c +++ b/tools/perf/util/callchain.c @@ -304,7 +304,7 @@ int perf_callchain_config(const char *var, const char *value) { char *endptr; - if (prefixcmp(var, "call-graph.")) + if (!strstarts(var, "call-graph.")) return 0; var += sizeof("call-graph.") - 1; |