Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1528592
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 02/18] perf annotate: Allow arches to specify functions to skip |
| Date | 2016-11-23 17:50 +0100 |
| Message-ID | <sGIUb-7ig-59@gated-at.bofh.it> (permalink) |
| References | <sGIU9-7ig-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Arnaldo Carvalho de Melo <acme@redhat.com>
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@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Chris Riyder <chris.ryder@arm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kim Phillips <kim.phillips@arm.com>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Taeung Song <treeze.taeung@gmail.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-2fi3sy7q3sssdi7m7cbe07gy@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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 1ba41a27214d..72769762ece9 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)
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-23 17:50 +0100 [PATCH 12/18] perf symbols: Print symbol offsets conditionally Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-23 17:50 +0100 [PATCH 06/18] perf tools: Show event fd in debug output Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-23 17:50 +0100 [PATCH 11/18] perf c2c: Support cascading options Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-23 17:50 +0100 [PATCH 13/18] perf evsel: Support printing callchains with arrows Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-23 17:50 +0100 [PATCH 14/18] perf sched timehist: Introduce timehist command Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-23 17:50 +0100 [PATCH 10/18] perf c2c report: Display total HITMs on default Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-23 17:50 +0100 [PATCH 01/18] perf annotate: Start supporting cross arch annotation Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-23 17:50 +0100 [PATCH 02/18] perf annotate: Allow arches to specify functions to skip Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-23 17:50 +0100 [PATCH 03/18] perf annotate: Add per arch instructions annotate handlers Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-23 17:50 +0100 [PATCH 17/18] perf sched timehist: Add call graph options Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-23 17:50 +0100 [PATCH 15/18] perf sched timehist: Add summary options Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-23 17:50 +0100 Re: [GIT PULL 00/18] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2016-11-24 05:20 +0100
csiph-web