aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-04-19 09:16:27 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-04-19 09:16:27 -0400
commit28548d78ad521310f0ae58f791aa796d3d685151 (patch)
tree381d507e987faec4e1628fecf588c85987adaa35 /tools/perf/util/annotate.h
parentd86b0597c4bd41ea3edc6446a855306eed34f93b (diff)
perf annotate: Introduce scnprintf ins_ops method
And implement the jump one, where if the operands string is not passed, a compact form that uses just the target address is used. Right now this is toggled via the 'o' option in the annotate browser, switching from: 0.00 : ffffffff811661e8: je ffffffff81166204 <mem_cgroup_count_vm_event+0x44> 0.00 : ffffffff811661ea: cmp $0xb,%esi 0.00 : ffffffff811661ed: je ffffffff811661f8 <mem_cgroup_count_vm_event+0x38> To: 0.00 : 28: je 44 0.00 : 2a: cmp $0xb,%esi 0.00 : 2d: je 38 Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> 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-o88q46yh4kxgpd1chk5gvjl5@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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
index a2105f204a42..6314335007f0 100644
--- a/tools/perf/util/annotate.h
+++ b/tools/perf/util/annotate.h
@@ -7,8 +7,12 @@
7#include <linux/list.h> 7#include <linux/list.h>
8#include <linux/rbtree.h> 8#include <linux/rbtree.h>
9 9
10struct ins;
11
10struct ins_ops { 12struct ins_ops {
11 int (*parse_target)(const char *operands, u64 *target); 13 int (*parse_target)(const char *operands, u64 *target);
14 int (*scnprintf)(struct ins *ins, char *bf, size_t size,
15 const char *operands, u64 target);
12}; 16};
13 17
14struct ins { 18struct ins {