perf annotate: Move the default annotate options to the library
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 7f0b6fde3111aec82487662ccef5a4ebecb93381 Gitweb: https://git.kernel.org/tip/7f0b6fde3111aec82487662ccef5a4ebecb93381 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Fri, 16 Mar 2018 14:33:38 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 21 Mar 2018 12:53:40 -0300
perf annotate: Move the default annotate options to the library
One more thing that goes from the TUI code to be used more widely, for instance it'll affect the default options used by:
perf annotate --stdio2
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]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/builtin-annotate.c | 2 ++ tools/perf/builtin-report.c | 1 + tools/perf/builtin-top.c | 2 ++ tools/perf/ui/browser.c | 2 -- tools/perf/ui/browser.h | 1 - tools/perf/ui/browsers/annotate.c | 67 +-------------------------------------- tools/perf/util/annotate.c | 62 ++++++++++++++++++++++++++++++++++++ tools/perf/util/annotate.h | 4 +++ 8 files changed, 72 insertions(+), 69 deletions(-)
tools/perf/builtin-annotate.c +2 -0
@@ -572,6 +572,8 @@ int cmd_annotate(int argc, const char **argv)if (ret <0 ) goto out_delete; +annotation_config__init (); + symbol_conf.try_vmlinux_path = true; ret =symbol__init (&annotate.session->header.env);
tools/perf/builtin-report.c +1 -0
@@ -1340,6 +1340,7 @@ repeat: symbol_conf.priv_size +=sizeof (u32); symbol_conf.sort_by_name = true; } +annotation_config__init (); }if (symbol__init (&session->header.env) <0 )
tools/perf/builtin-top.c +2 -0
@@ -1493,6 +1493,8 @@ int cmd_top(int argc, const char **argv)if (status <0 ) goto out_delete_evlist; +annotation_config__init (); + symbol_conf.try_vmlinux_path = (symbol_conf.vmlinux_name ==NULL );if (symbol__init (NULL ) <0 )return -1 ;
tools/perf/ui/browser.c +0 -2
@@ -784,6 +784,4 @@ void ui_browser__init(void)struct ui_browser_colorset *c = &ui_browser__colorsets[i++];sltt_set_color (c->colorset, c->name, c->fg, c->bg); } - -annotate_browser__init (); }
tools/perf/ui/browser.h +0 -1
@@ -79,5 +79,4 @@ void ui_browser__list_head_seek(struct ui_browser *browser, off_t offset, int whunsigned int ui_browser__list_head_refresh (struct ui_browser *browser);void ui_browser__init (void ); -void annotate_browser__init (void );#endif /* _PERF_UI_BROWSER_H_ */
tools/perf/ui/browsers/annotate.c +1 -66
94 lines not on this page · raw message
tools/perf/util/annotate.c +62 -0
77 lines not on this page · raw message
tools/perf/util/annotate.h +4 -0
@@ -71,6 +71,8 @@ struct annotation_options { show_total_period; }; +extern struct annotation_options annotation__default_options; +struct annotation ;struct sym_hist_entry {
@@ -313,4 +315,6 @@ static inline int symbol__tui_annotate(struct symbol *sym __maybe_unused,extern const char *disassembler_style; +void annotation_config__init (void ); +#endif /* __PERF_ANNOTATE_H */