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 <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jin Yao <yao.jin@linux.intel.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-g0ckz9ajy6unswrv2iy39mxk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user