Skip to contentSkip to conversation

perf annotate browser: Read perf config file for settings

tip:perf/urgent tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message May 30, 2012 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  c323cf0400c1fed853738e6d81e83c6ac7ff5105
Gitweb:     http://git.kernel.org/tip/c323cf0400c1fed853738e6d81e83c6ac7ff5105
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Tue, 29 May 2012 22:06:30 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 29 May 2012 22:06:30 -0300

perf annotate browser: Read perf config file for settings

The defaults are:

[annotate]

hide_src_code = false
use_offset = true
jump_arrows = true
show_nr_jumps = false

Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
---
 tools/perf/Documentation/perfconfig.example |    8 ++++
 tools/perf/ui/browser.c                     |    2 +
 tools/perf/ui/browser.h                     |    1 +
 tools/perf/ui/browsers/annotate.c           |   49 +++++++++++++++++++++++++++
 4 files changed, 60 insertions(+), 0 deletions(-)
tools/perf/Documentation/perfconfig.example +8 -0
index 42c6fd2..767ea24 100644
@@ -19,3 +19,11 @@
 
 	# Default, disable using /dev/null
 	dir = /root/.debug
+
+[annotate]
+
+	# Defaults
+	hide_src_code = false
+	use_offset = true
+	jump_arrows = true
+	show_nr_jumps = false
tools/perf/ui/browser.c +2 -0
index cde4d0f..c3a769ad 100644
@@ -708,4 +708,6 @@ 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 +1 -0
index dd96d82..af70314 100644
@@ -69,4 +69,5 @@ void ui_browser__list_head_seek(struct ui_browser *self, off_t offset, int whenc
 unsigned int ui_browser__list_head_refresh(struct ui_browser *self);
 
 void ui_browser__init(void);
+void annotate_browser__init(void);
 #endif /* _PERF_UI_BROWSER_H_ */
tools/perf/ui/browsers/annotate.c +49 -0

52 lines not on this page · raw message