Commit 7f0b6fde authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

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 <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-0nsz0dm0akdbo30vgja2a10e@git.kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent befd2a38
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -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)
+2 −0
Original line number Diff line number Diff line
@@ -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;
+0 −2
Original line number Diff line number Diff line
@@ -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();
}
+0 −1
Original line number Diff line number Diff line
@@ -79,5 +79,4 @@ void ui_browser__list_head_seek(struct ui_browser *browser, off_t offset, int wh
unsigned 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_ */
Loading