Skip to contentSkip to conversation

perf annotate/tui: Fix 'annotate.use_offset' config variable usage

PATCH New Namhyung Kim 2 participants 2 messages Oct 21, 2015 – Oct 23, 2015 perf events

lore
Share & tools
lore

Namhyung Kim

author maintainer
#0 lore raw

PATCH 1/1 perf annotate/tui: Fix 'annotate.use_offset' config variable usage

The annotate__configs should be sorted so that it can use bsearch(3). However commit 0c4a5bcea460 ("perf annotate: Display total number of samples with --show-total-period") added a new config item at the end. This resulted in the 'annotate.use_offset' config variable cannot be found and perf terminated like below:

  $ perf report
  bad config file line 6 in ~/.perfconfig
Cc Martin Liška <[email protected]>
Cc Taeung Song <[email protected]>
---
 tools/perf/ui/browsers/annotate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/ui/browsers/annotate.c +1 -1
index 29739b347599..6a2b5fe64a9b 100644
@@ -1125,8 +1125,8 @@ static struct annotate_config {
 	ANNOTATE_CFG(jump_arrows),
 	ANNOTATE_CFG(show_linenr),
 	ANNOTATE_CFG(show_nr_jumps),
-	ANNOTATE_CFG(use_offset),
 	ANNOTATE_CFG(show_total_period),
+	ANNOTATE_CFG(use_offset),
 };
 
 #undef ANNOTATE_CFG
Signature · 1 line
2.6.1
#1 lore raw

[tip:perf/core] perf annotate: Fix 'annotate.use_offset' config variable usage

perf annotate: Fix 'annotate.use_offset' config variable usage
Commit-ID:  39ff7cdb5a5e6b75dd049255615828c6531cd109
Gitweb:     http://git.kernel.org/tip/39ff7cdb5a5e6b75dd049255615828c6531cd109
Author:     Namhyung Kim <[email protected]>
AuthorDate: Wed, 21 Oct 2015 11:57:20 +0900
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 22 Oct 2015 16:34:29 -0300

perf annotate: Fix 'annotate.use_offset' config variable usage

The annotate__configs should be sorted so that it can use bsearch(3).

However commit 0c4a5bcea460 ("perf annotate: Display total number of samples with --show-total-period") added a new config item at the end. This resulted in the 'annotate.use_offset' config variable cannot be found and perf terminated like below:

  $ perf report
  bad config file line 6 in ~/.perfconfig
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Martin Liška <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Taeung Song <[email protected]>
Fixes 0c4a5bcea460 ("perf annotate: Display total number of samples with --show-total-period")
---
 tools/perf/ui/browsers/annotate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/ui/browsers/annotate.c +1 -1
index bec0b62..ba72e01 100644
@@ -1125,8 +1125,8 @@ static struct annotate_config {
 	ANNOTATE_CFG(jump_arrows),
 	ANNOTATE_CFG(show_linenr),
 	ANNOTATE_CFG(show_nr_jumps),
-	ANNOTATE_CFG(use_offset),
 	ANNOTATE_CFG(show_total_period),
+	ANNOTATE_CFG(use_offset),
 };
 
 #undef ANNOTATE_CFG