aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <[email protected]>2018-03-16 13:39:24 +0000
committerArnaldo Carvalho de Melo <[email protected]>2018-03-20 18:36:22 +0000
commit9b80d1f946ee40923f7bf51c69cb3a6ac6097e4a (patch)
treeb625629681efcb8ccf873dddf1366ec014795fa0 /tools/perf/util/annotate.h
parentperf annotate: Use a ops table for annotation_line__write() (diff)
downloadkernel-9b80d1f946ee40923f7bf51c69cb3a6ac6097e4a.tar.gz
kernel-9b80d1f946ee40923f7bf51c69cb3a6ac6097e4a.zip
perf annotate: Introduce annotation_line__filter()
Out of the TUI logic that allows toggling the presentation of source code lines. Will be used in the upcoming --stdio2 mode. Cc: Adrian Hunter <[email protected]> Cc: Andi Kleen <[email protected]> Cc: David Ahern <[email protected]> Cc: Jin Yao <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: https://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/annotate.h')
-rw-r--r--tools/perf/util/annotate.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
index 6fbb34b9bd77..165845de1243 100644
--- a/tools/perf/util/annotate.h
+++ b/tools/perf/util/annotate.h
@@ -215,6 +215,10 @@ static inline int annotation__pcnt_width(struct annotation *notes)
return (notes->options->show_total_period ? 12 : 7) * notes->nr_events;
}
+static inline bool annotation_line__filter(struct annotation_line *al, struct annotation *notes)
+{
+ return notes->options->hide_src_code && al->offset == -1;
+}
void annotation__set_offsets(struct annotation *notes, s64 size);
void annotation__compute_ipc(struct annotation *notes, size_t size);