diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-04-18 13:58:34 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-04-18 13:58:34 -0300 |
commit | 4f9d03251b9d202ebce805757360ef0fac5eb74e (patch) | |
tree | 828b5d690bcd1bb1b04a98d7c735a54545cc589e /tools/perf/util/annotate.h | |
parent | 657bcaf5097e1aff53d724358deb24ce803f43a4 (diff) |
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 <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-7vzlh66n5or46n27ji658cnl@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/annotate.h')
-rw-r--r-- | tools/perf/util/annotate.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h index dd7636d24133..934c6fe3a91b 100644 --- a/tools/perf/util/annotate.h +++ b/tools/perf/util/annotate.h @@ -7,11 +7,24 @@ #include <linux/list.h> #include <linux/rbtree.h> +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; }; |