From acc9bfb5fae5c48ca875911d87d8d8a9d886bb66 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 18 Nov 2016 16:54:10 -0300 Subject: perf annotate: Improve support for ARM By using arch->init() to set up some regular expressions to associate ins_ops to ARM instructions, ditching that old table that has instructions not present on ARM. Take advantage of having an arch->init() to hide more arm specific stuff from the common code, like the objdump details. The regular expressions comes from a patch written by Kim Phillips. Reviewed-by: Ravi Bangoria Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Chris Riyder Cc: David Ahern Cc: Jiri Olsa Cc: Kim Phillips Cc: Markus Trippelsdorf Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Pawel Moll Cc: Peter Zijlstra Cc: Russell King Cc: Taeung Song Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-77m7lufz9ajjimkrebtg5ead@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/annotate.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'tools/perf/util/annotate.c') diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 1e96549650d7..bad44db7dd67 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -84,7 +84,7 @@ grow_from_non_allocated_table: goto out_update_instructions; } -static __maybe_unused int arch__associate_ins_ops(struct arch* arch, const char *name, struct ins_ops *ops) +static int arch__associate_ins_ops(struct arch* arch, const char *name, struct ins_ops *ops) { struct ins *ins; @@ -110,12 +110,7 @@ static __maybe_unused int arch__associate_ins_ops(struct arch* arch, const char static struct arch architectures[] = { { .name = "arm", - .instructions = arm__instructions, - .nr_instructions = ARRAY_SIZE(arm__instructions), - .objdump = { - .comment_char = ';', - .skip_functions_char = '+', - }, + .init = arm__annotate_init, }, { .name = "x86", -- cgit v1.2.3