lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-2fi3sy7q3sssdi7m7cbe07gy@git.kernel.org>
Date:   Wed, 23 Nov 2016 20:13:23 -0800
From:   tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     ravi.bangoria@...ux.vnet.ibm.com, jolsa@...nel.org,
        naveen.n.rao@...ux.vnet.ibm.com,
        alexander.shishkin@...ux.intel.com, pawel.moll@....com,
        hpa@...or.com, dsahern@...il.com, markus@...ppelsdorf.de,
        acme@...hat.com, mhiramat@...nel.org, peterz@...radead.org,
        kim.phillips@....com, rmk+kernel@....linux.org.uk,
        tglx@...utronix.de, chris.ryder@....com, mingo@...nel.org,
        treeze.taeung@...il.com, wangnan0@...wei.com, namhyung@...nel.org,
        linux-kernel@...r.kernel.org, adrian.hunter@...el.com
Subject: [tip:perf/core] perf annotate: Allow arches to specify functions to
 skip

Commit-ID:  9c2fb451bda0aa60127e63e44993401818326e91
Gitweb:     http://git.kernel.org/tip/9c2fb451bda0aa60127e63e44993401818326e91
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Wed, 16 Nov 2016 15:50:38 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 17 Nov 2016 17:12:56 -0300

perf annotate: Allow arches to specify functions to skip

This is to cope with an ARM specific kludge introduced in the original
patch supporting ARM annotation, cfef25b8daf7 ("perf annotate: ARM
support") that made functions with a '+' in its name to be skipped when
processing call instructions.

With this patchkit it should be possible to collect a perf.data file on
a ARM machine and then annotate it on a x86 workstation and have those
ARM kludges used.

Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Chris Riyder <chris.ryder@....com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Kim Phillips <kim.phillips@....com>
Cc: Markus Trippelsdorf <markus@...ppelsdorf.de>
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Naveen N. Rao <naveen.n.rao@...ux.vnet.ibm.com>
Cc: Pawel Moll <pawel.moll@....com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
Cc: Russell King <rmk+kernel@....linux.org.uk>
Cc: Taeung Song <treeze.taeung@...il.com>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-2fi3sy7q3sssdi7m7cbe07gy@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/annotate.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 1ba41a2..7276976 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -35,6 +35,7 @@ struct arch {
 	const char	*name;
 	struct		{
 		char comment_char;
+		char skip_functions_char;
 	} objdump;
 };
 
@@ -43,6 +44,7 @@ static struct arch architectures[] = {
 		.name = "arm",
 		.objdump =  {
 			.comment_char = ';',
+			.skip_functions_char = '+',
 		},
 	},
 	{
@@ -78,7 +80,7 @@ int ins__scnprintf(struct ins *ins, char *bf, size_t size,
 	return ins__raw_scnprintf(ins, bf, size, ops);
 }
 
-static int call__parse(struct arch *arch __maybe_unused, struct ins_operands *ops, struct map *map)
+static int call__parse(struct arch *arch, struct ins_operands *ops, struct map *map)
 {
 	char *endptr, *tok, *name;
 
@@ -90,10 +92,9 @@ static int call__parse(struct arch *arch __maybe_unused, struct ins_operands *op
 
 	name++;
 
-#ifdef __arm__
-	if (strchr(name, '+'))
+	if (arch->objdump.skip_functions_char &&
+	    strchr(name, arch->objdump.skip_functions_char))
 		return -1;
-#endif
 
 	tok = strchr(name, '>');
 	if (tok == NULL)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ