perf evsel: Add has_callchain() helper to make code more compact/clear
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 28 May 2018 19:00:29 +0000 (16:00 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 5 Jun 2018 13:09:54 +0000 (10:09 -0300)
commit27de9b2bd996de0ca4079c42c81c85158e10145c
tree98202794dad73383f1a5e865445c3c04b91d068c
parent9d0199cd2a7a326510fc7f731d7974ef2fbc03d0
perf evsel: Add has_callchain() helper to make code more compact/clear

Its common to have the (evsel->attr.sample_type & PERF_SAMPLE_CALLCHAIN),
so add an evsel__has_callchain(evsel) helper.

This will actually get more uses as we check that instead of
symbol_conf.use_callchain in places where that produces the same result
but makes this decision to be more fine grained, per evsel.

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-145340oytbthatpfeaq1do18@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-sched.c
tools/perf/builtin-script.c
tools/perf/builtin-trace.c
tools/perf/tests/parse-events.c
tools/perf/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/hist.c
tools/perf/util/session.c