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>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
93ccae7a22
commit
4984912eb2
@@ -740,6 +740,13 @@ static int synthesize_kprobe_trace_arg(struct kprobe_trace_arg *arg,
|
||||
buf += ret;
|
||||
buflen -= ret;
|
||||
}
|
||||
/* Print argument type */
|
||||
if (arg->type) {
|
||||
ret = e_snprintf(buf, buflen, ":%s", arg->type);
|
||||
if (ret <= 0)
|
||||
return ret;
|
||||
buf += ret;
|
||||
}
|
||||
|
||||
return buf - tmp;
|
||||
}
|
||||
@@ -848,6 +855,8 @@ void clear_kprobe_trace_event(struct kprobe_trace_event *tev)
|
||||
free(tev->args[i].name);
|
||||
if (tev->args[i].value)
|
||||
free(tev->args[i].value);
|
||||
if (tev->args[i].type)
|
||||
free(tev->args[i].type);
|
||||
ref = tev->args[i].ref;
|
||||
while (ref) {
|
||||
next = ref->next;
|
||||
|
Reference in New Issue
Block a user