perf, tools: In branch stack mode use address history sorting
PATCH 1/2 perf, tools: In branch stack mode use address history sorting
From: Andi Kleen <[email protected]>
Enable CCKEY_ADDRESS address history sorting with --branch-history. This makes get_srcline display the source lines correctly, otherwise all history entries for a function a hunked into one.
--- tools/perf/builtin-report.c | 1 + 1 file changed, 1 insertion(+)
tools/perf/builtin-report.c +1 -0
@@ -761,6 +761,7 @@ repeat: symbol_conf.cumulate_callchain = false; }if (branch_call_mode) { + callchain_param.key =CCKEY_ADDRESS ; callchain_param.branch_callstack =1 ; symbol_conf.use_callchain = true;callchain_register_param (&callchain_param);
Signature · 1 line
1.9.3
PATCH 2/2 perf, tools: Remove use of BUILD_BUG_ON
From: Andi Kleen <[email protected]>
BUILD_BUG_ON relies on the gcc optimizer, so it breaks the build with DEBUG=1 which doesn't use -O2.
Turn the BUILD_BUG_ON into a runtime check again.
Also fix the check to check for 255, not 127.
--- tools/perf/util/machine.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
tools/perf/util/machine.c +1 -2
@@ -1446,8 +1446,7 @@ static int remove_loops(struct branch_entry *l, int nr)memset (chash,NO_ENTRY ,sizeof (chash)); -BUILD_BUG_ON_MSG (PERF_MAX_BRANCH_DEPTH >127 , -"Please upgrade the type of the hash table from unsigned char" ); +BUG_ON (PERF_MAX_BRANCH_DEPTH >255 );for (i =0 ; i < nr; i++) {int h =hash_64 (l[i].from,CHASHBITS ) %CHASHSZ ;
Signature · 1 line
1.9.3
tip-bot for Andi Kleen
merge bot[tip:perf/core] perf report: In branch stack mode use address history sorting
In reply to Andi Kleenperf report: In branch stack mode use address history sorting
Commit-ID: 09a6a1b07e5a579ef770d9728f5b158408c73c23 Gitweb: http://git.kernel.org/tip/09a6a1b07e5a579ef770d9728f5b158408c73c23 Author: Andi Kleen <[email protected]> AuthorDate: Mon, 17 Nov 2014 17:58:54 -0800 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Mon, 1 Dec 2014 20:00:31 -0300
perf report: In branch stack mode use address history sorting
Enable CCKEY_ADDRESS address history sorting with --branch-history. This makes get_srcline display the source lines correctly, otherwise all history entries for a function a hunked into one.
--- tools/perf/builtin-report.c | 1 + 1 file changed, 1 insertion(+)
tools/perf/builtin-report.c +1 -0
@@ -761,6 +761,7 @@ repeat: symbol_conf.cumulate_callchain = false; }if (branch_call_mode) { + callchain_param.key =CCKEY_ADDRESS ; callchain_param.branch_callstack =1 ; symbol_conf.use_callchain = true;callchain_register_param (&callchain_param);