diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2010-04-12 13:17:08 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-04-14 16:26:28 -0400 |
commit | 93ccae7a2227466a0d071fe52c51319f2f34c365 (patch) | |
tree | ad98a4db74fff834ce79b83f21192713cc3665bc /kernel/trace/trace.h | |
parent | df0faf4be02996135bc3a06b4f34360449c78084 (diff) |
tracing/kprobes: Support basic types on dynamic events
Support basic types of integer (u8, u16, u32, u64, s8, s16, s32, s64) in
kprobe tracer. With this patch, users can specify above basic types on
each arguments after ':'. If omitted, the argument type is set as
unsigned long (u32 or u64, arch-dependent).
e.g.
echo 'p account_system_time+0 hardirq_offset=%si:s32' > kprobe_events
adds a probe recording hardirq_offset in signed-32bits value on the
entry of account_system_time.
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
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: <20100412171708.3790.18599.stgit@localhost6.localdomain6>
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index bec2c973ff0c..3ebdb6bd2362 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -102,29 +102,17 @@ struct syscall_trace_exit { | |||
102 | long ret; | 102 | long ret; |
103 | }; | 103 | }; |
104 | 104 | ||
105 | struct kprobe_trace_entry { | 105 | struct kprobe_trace_entry_head { |
106 | struct trace_entry ent; | 106 | struct trace_entry ent; |
107 | unsigned long ip; | 107 | unsigned long ip; |
108 | int nargs; | ||
109 | unsigned long args[]; | ||
110 | }; | 108 | }; |
111 | 109 | ||
112 | #define SIZEOF_KPROBE_TRACE_ENTRY(n) \ | 110 | struct kretprobe_trace_entry_head { |
113 | (offsetof(struct kprobe_trace_entry, args) + \ | ||
114 | (sizeof(unsigned long) * (n))) | ||
115 | |||
116 | struct kretprobe_trace_entry { | ||
117 | struct trace_entry ent; | 111 | struct trace_entry ent; |
118 | unsigned long func; | 112 | unsigned long func; |
119 | unsigned long ret_ip; | 113 | unsigned long ret_ip; |
120 | int nargs; | ||
121 | unsigned long args[]; | ||
122 | }; | 114 | }; |
123 | 115 | ||
124 | #define SIZEOF_KRETPROBE_TRACE_ENTRY(n) \ | ||
125 | (offsetof(struct kretprobe_trace_entry, args) + \ | ||
126 | (sizeof(unsigned long) * (n))) | ||
127 | |||
128 | /* | 116 | /* |
129 | * trace_flag_type is an enumeration that holds different | 117 | * trace_flag_type is an enumeration that holds different |
130 | * states when a trace occurs. These are: | 118 | * states when a trace occurs. These are: |