aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/probe-event.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2010-04-12 13:17:15 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-04-14 16:27:56 -0400
commit4984912eb23113a4007940cd09c8351c0623ea5f (patch)
tree81e725def8479b4f4c7d7114f30df690784864c1 /tools/perf/util/probe-event.c
parent93ccae7a2227466a0d071fe52c51319f2f34c365 (diff)
perf probe: Query basic types from debuginfo
Query the basic type information (byte-size and signed-flag) from debuginfo and pass that to kprobe-tracer. This is especially useful for tracing the members of data structure, because each member has different byte-size on the memory. Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20100412171715.3790.23730.stgit@localhost6.localdomain6> Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-event.c')
-rw-r--r--tools/perf/util/probe-event.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 19de8b77973d..05ca4a959e60 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -740,6 +740,13 @@ static int synthesize_kprobe_trace_arg(struct kprobe_trace_arg *arg,
740 buf += ret; 740 buf += ret;
741 buflen -= ret; 741 buflen -= ret;
742 } 742 }
743 /* Print argument type */
744 if (arg->type) {
745 ret = e_snprintf(buf, buflen, ":%s", arg->type);
746 if (ret <= 0)
747 return ret;
748 buf += ret;
749 }
743 750
744 return buf - tmp; 751 return buf - tmp;
745} 752}
@@ -848,6 +855,8 @@ void clear_kprobe_trace_event(struct kprobe_trace_event *tev)
848 free(tev->args[i].name); 855 free(tev->args[i].name);
849 if (tev->args[i].value) 856 if (tev->args[i].value)
850 free(tev->args[i].value); 857 free(tev->args[i].value);
858 if (tev->args[i].type)
859 free(tev->args[i].type);
851 ref = tev->args[i].ref; 860 ref = tev->args[i].ref;
852 while (ref) { 861 while (ref) {
853 next = ref->next; 862 next = ref->next;