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>
This commit is contained in:
Arnaldo Carvalho de Melo 2012-04-20 14:38:46 -03:00
parent 3f862fd076
commit c7e6ead734
3 changed files with 49 additions and 46 deletions

View file

@ -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);