diff options
author | Andi Kleen <ak@linux.intel.com> | 2015-07-18 08:24:47 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-08-06 16:31:39 -0300 |
commit | 98df858ed46ddaaf9be3573eb2b63b57a68c6af7 (patch) | |
tree | 9c96ebd8cff27be865a70a5d7ded60b309aaa847 /tools/perf/builtin-report.c | |
parent | 0e332f033a8216fa03792fde69882f66500848c7 (diff) | |
download | linux-98df858ed46ddaaf9be3573eb2b63b57a68c6af7.tar.gz linux-98df858ed46ddaaf9be3573eb2b63b57a68c6af7.tar.bz2 linux-98df858ed46ddaaf9be3573eb2b63b57a68c6af7.zip |
perf report: Add flag for non ANY branch mode
Later patches need to cheaply check that the branch mode is in ANY. Add
a new function to check all event attrs and add a flag to the report
state, which is then initialized.
v2: Rename flag
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1437233094-12844-3-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 95a47719aec3..3ba0e9737dc5 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -53,6 +53,7 @@ struct report { bool mem_mode; bool header; bool header_only; + bool nonany_branch_mode; int max_stack; struct perf_read_values show_threads_values; const char *pretty_printing_style; @@ -258,6 +259,12 @@ static int report__setup_sample_type(struct report *rep) else callchain_param.record_mode = CALLCHAIN_FP; } + + /* ??? handle more cases than just ANY? */ + if (!(perf_evlist__combined_branch_type(session->evlist) & + PERF_SAMPLE_BRANCH_ANY)) + rep->nonany_branch_mode = true; + return 0; } |