uprobes/tracing: Generalize struct uprobe_trace_entry_head
authorOleg Nesterov <oleg@redhat.com>
Fri, 29 Mar 2013 17:26:51 +0000 (18:26 +0100)
committerOleg Nesterov <oleg@redhat.com>
Sat, 13 Apr 2013 13:32:01 +0000 (15:32 +0200)
commit77c49e4da225bee939dddf593337c7298d585ef6
tree49da165c316ec7086272994ede7ac96e334d6850
parentba3322af8111f78e8e7bbb609080434b7ea8e721
uprobes/tracing: Generalize struct uprobe_trace_entry_head

struct uprobe_trace_entry_head has a single member for reporting,
"unsigned long ip". If we want to support uretprobes we need to
create another struct which has "func" and "ret_ip" and duplicate
a lot of functions, like trace_kprobe.c does.

To avoid this copy-and-paste horror we turn ->ip into ->vaddr[]
and add couple of trivial helpers to calculate sizeof/data. This
uglifies the code a bit, but this allows us to avoid a lot more
complications later, when we add the support for ret-probes.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Tested-by: Anton Arapov <anton@redhat.com>
kernel/trace/trace.h
kernel/trace/trace_uprobe.c