From 4f9d03251b9d202ebce805757360ef0fac5eb74e Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Wed, 18 Apr 2012 13:58:34 -0300 Subject: perf annotate: Disassembler instruction parsing So that at disassembly time we parse targets, etc. Supporting jump instructions initially, call functions are next. Cc: David Ahern Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-7vzlh66n5or46n27ji658cnl@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/annotate.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tools/perf/util/annotate.h') diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h index dd7636d..934c6fe 100644 --- a/tools/perf/util/annotate.h +++ b/tools/perf/util/annotate.h @@ -7,11 +7,24 @@ #include #include +struct ins_ops { + int (*parse_target)(const char *operands, u64 *target); +}; + +struct ins { + const char *name; + struct ins_ops *ops; +}; + +bool ins__is_jump(const struct ins *ins); + struct disasm_line { struct list_head node; s64 offset; + u64 target; char *line; char *name; + struct ins *ins; char *operands; }; -- cgit v1.1