summaryrefslogtreecommitdiff
path: root/tools/perf/util/annotate.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-04-20 21:38:46 +0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-04-20 21:38:46 +0400
commitc7e6ead7347813b5833efb9b32908c08ff131259 (patch)
tree4cd53ffe880c0cf15ee9539682623f5aed8f4378 /tools/perf/util/annotate.h
parent3f862fd076275c442dfe295eddb5650a6e0aecd4 (diff)
downloadlinux-c7e6ead7347813b5833efb9b32908c08ff131259.tar.xz
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.h22
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 @@
struct ins;
+struct ins_operands {
+ char *raw;
+ u64 target;
+};
+
struct ins_ops {
- int (*parse_target)(const char *operands, u64 *target);
+ int (*parse)(struct ins_operands *ops);
int (*scnprintf)(struct ins *ins, char *bf, size_t size,
- const char *operands, u64 target);
+ struct ins_operands *ops, bool addrs);
};
struct ins {
@@ -24,13 +29,12 @@ bool ins__is_jump(const struct ins *ins);
bool ins__is_call(const struct ins *ins);
struct disasm_line {
- struct list_head node;
- s64 offset;
- u64 target;
- char *line;
- char *name;
- struct ins *ins;
- char *operands;
+ struct list_head node;
+ s64 offset;
+ char *line;
+ char *name;
+ struct ins *ins;
+ struct ins_operands ops;
};
void disasm_line__free(struct disasm_line *dl);