diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-04-20 13:38:46 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-04-20 13:38:46 -0400 |
commit | c7e6ead7347813b5833efb9b32908c08ff131259 (patch) | |
tree | 4cd53ffe880c0cf15ee9539682623f5aed8f4378 /tools/perf/util/annotate.h | |
parent | 3f862fd076275c442dfe295eddb5650a6e0aecd4 (diff) |
perf annotate: Group operands members
So that the ins_ops can handle them in a single place, instead of adding
more and more functions or ins_ops parameters.
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-pk4dqaum6ftiz104dvimwgtb@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 | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h index 6314335007f0..a6f60d5c5138 100644 --- a/tools/perf/util/annotate.h +++ b/tools/perf/util/annotate.h | |||
@@ -9,10 +9,15 @@ | |||
9 | 9 | ||
10 | struct ins; | 10 | struct ins; |
11 | 11 | ||
12 | struct ins_operands { | ||
13 | char *raw; | ||
14 | u64 target; | ||
15 | }; | ||
16 | |||
12 | struct ins_ops { | 17 | struct ins_ops { |
13 | int (*parse_target)(const char *operands, u64 *target); | 18 | int (*parse)(struct ins_operands *ops); |
14 | int (*scnprintf)(struct ins *ins, char *bf, size_t size, | 19 | int (*scnprintf)(struct ins *ins, char *bf, size_t size, |
15 | const char *operands, u64 target); | 20 | struct ins_operands *ops, bool addrs); |
16 | }; | 21 | }; |
17 | 22 | ||
18 | struct ins { | 23 | struct ins { |
@@ -24,13 +29,12 @@ bool ins__is_jump(const struct ins *ins); | |||
24 | bool ins__is_call(const struct ins *ins); | 29 | bool ins__is_call(const struct ins *ins); |
25 | 30 | ||
26 | struct disasm_line { | 31 | struct disasm_line { |
27 | struct list_head node; | 32 | struct list_head node; |
28 | s64 offset; | 33 | s64 offset; |
29 | u64 target; | 34 | char *line; |
30 | char *line; | 35 | char *name; |
31 | char *name; | 36 | struct ins *ins; |
32 | struct ins *ins; | 37 | struct ins_operands ops; |
33 | char *operands; | ||
34 | }; | 38 | }; |
35 | 39 | ||
36 | void disasm_line__free(struct disasm_line *dl); | 40 | void disasm_line__free(struct disasm_line *dl); |