diff options
author | Jiri Olsa <jolsa@redhat.com> | 2012-02-15 09:51:53 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-02-21 11:08:29 -0500 |
commit | 02aa3162edaa166a01d193f80ccde890be8b55da (patch) | |
tree | 50f111c12472e5573b966d7fb076ba4b22c86669 /kernel/trace/trace_entries.h | |
parent | ced39002f5ea736b716ae233fb68b26d59783912 (diff) |
ftrace: Allow to specify filter field type for ftrace events
Adding FILTER_TRACE_FN event field type for function tracepoint
event, so it can be properly recognized within filtering code.
Currently all fields of ftrace subsystem events share the common
field type FILTER_OTHER. Since the function trace fields need
special care within the filtering code we need to recognize it
properly, hence adding the FILTER_TRACE_FN event type.
Adding filter parameter to the FTRACE_ENTRY macro, to specify the
filter field type for the event.
Link: http://lkml.kernel.org/r/1329317514-8131-7-git-send-email-jolsa@redhat.com
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_entries.h')
-rw-r--r-- | kernel/trace/trace_entries.h | 48 |
1 files changed, 35 insertions, 13 deletions
diff --git a/kernel/trace/trace_entries.h b/kernel/trace/trace_entries.h index 47db7eda0531..d91eb0541b3a 100644 --- a/kernel/trace/trace_entries.h +++ b/kernel/trace/trace_entries.h | |||
@@ -66,6 +66,8 @@ FTRACE_ENTRY_REG(function, ftrace_entry, | |||
66 | 66 | ||
67 | F_printk(" %lx <-- %lx", __entry->ip, __entry->parent_ip), | 67 | F_printk(" %lx <-- %lx", __entry->ip, __entry->parent_ip), |
68 | 68 | ||
69 | FILTER_TRACE_FN, | ||
70 | |||
69 | perf_ftrace_event_register | 71 | perf_ftrace_event_register |
70 | ); | 72 | ); |
71 | 73 | ||
@@ -80,7 +82,9 @@ FTRACE_ENTRY(funcgraph_entry, ftrace_graph_ent_entry, | |||
80 | __field_desc( int, graph_ent, depth ) | 82 | __field_desc( int, graph_ent, depth ) |
81 | ), | 83 | ), |
82 | 84 | ||
83 | F_printk("--> %lx (%d)", __entry->func, __entry->depth) | 85 | F_printk("--> %lx (%d)", __entry->func, __entry->depth), |
86 | |||
87 | FILTER_OTHER | ||
84 | ); | 88 | ); |
85 | 89 | ||
86 | /* Function return entry */ | 90 | /* Function return entry */ |
@@ -100,7 +104,9 @@ FTRACE_ENTRY(funcgraph_exit, ftrace_graph_ret_entry, | |||
100 | F_printk("<-- %lx (%d) (start: %llx end: %llx) over: %d", | 104 | F_printk("<-- %lx (%d) (start: %llx end: %llx) over: %d", |
101 | __entry->func, __entry->depth, | 105 | __entry->func, __entry->depth, |
102 | __entry->calltime, __entry->rettime, | 106 | __entry->calltime, __entry->rettime, |
103 | __entry->depth) | 107 | __entry->depth), |
108 | |||
109 | FILTER_OTHER | ||
104 | ); | 110 | ); |
105 | 111 | ||
106 | /* | 112 | /* |
@@ -129,8 +135,9 @@ FTRACE_ENTRY(context_switch, ctx_switch_entry, | |||
129 | F_printk("%u:%u:%u ==> %u:%u:%u [%03u]", | 135 | F_printk("%u:%u:%u ==> %u:%u:%u [%03u]", |
130 | __entry->prev_pid, __entry->prev_prio, __entry->prev_state, | 136 | __entry->prev_pid, __entry->prev_prio, __entry->prev_state, |
131 | __entry->next_pid, __entry->next_prio, __entry->next_state, | 137 | __entry->next_pid, __entry->next_prio, __entry->next_state, |
132 | __entry->next_cpu | 138 | __entry->next_cpu), |
133 | ) | 139 | |
140 | FILTER_OTHER | ||
134 | ); | 141 | ); |
135 | 142 | ||
136 | /* | 143 | /* |
@@ -148,8 +155,9 @@ FTRACE_ENTRY_DUP(wakeup, ctx_switch_entry, | |||
148 | F_printk("%u:%u:%u ==+ %u:%u:%u [%03u]", | 155 | F_printk("%u:%u:%u ==+ %u:%u:%u [%03u]", |
149 | __entry->prev_pid, __entry->prev_prio, __entry->prev_state, | 156 | __entry->prev_pid, __entry->prev_prio, __entry->prev_state, |
150 | __entry->next_pid, __entry->next_prio, __entry->next_state, | 157 | __entry->next_pid, __entry->next_prio, __entry->next_state, |
151 | __entry->next_cpu | 158 | __entry->next_cpu), |
152 | ) | 159 | |
160 | FILTER_OTHER | ||
153 | ); | 161 | ); |
154 | 162 | ||
155 | /* | 163 | /* |
@@ -171,7 +179,9 @@ FTRACE_ENTRY(kernel_stack, stack_entry, | |||
171 | "\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n", | 179 | "\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n", |
172 | __entry->caller[0], __entry->caller[1], __entry->caller[2], | 180 | __entry->caller[0], __entry->caller[1], __entry->caller[2], |
173 | __entry->caller[3], __entry->caller[4], __entry->caller[5], | 181 | __entry->caller[3], __entry->caller[4], __entry->caller[5], |
174 | __entry->caller[6], __entry->caller[7]) | 182 | __entry->caller[6], __entry->caller[7]), |
183 | |||
184 | FILTER_OTHER | ||
175 | ); | 185 | ); |
176 | 186 | ||
177 | FTRACE_ENTRY(user_stack, userstack_entry, | 187 | FTRACE_ENTRY(user_stack, userstack_entry, |
@@ -187,7 +197,9 @@ FTRACE_ENTRY(user_stack, userstack_entry, | |||
187 | "\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n", | 197 | "\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n", |
188 | __entry->caller[0], __entry->caller[1], __entry->caller[2], | 198 | __entry->caller[0], __entry->caller[1], __entry->caller[2], |
189 | __entry->caller[3], __entry->caller[4], __entry->caller[5], | 199 | __entry->caller[3], __entry->caller[4], __entry->caller[5], |
190 | __entry->caller[6], __entry->caller[7]) | 200 | __entry->caller[6], __entry->caller[7]), |
201 | |||
202 | FILTER_OTHER | ||
191 | ); | 203 | ); |
192 | 204 | ||
193 | /* | 205 | /* |
@@ -204,7 +216,9 @@ FTRACE_ENTRY(bprint, bprint_entry, | |||
204 | ), | 216 | ), |
205 | 217 | ||
206 | F_printk("%08lx fmt:%p", | 218 | F_printk("%08lx fmt:%p", |
207 | __entry->ip, __entry->fmt) | 219 | __entry->ip, __entry->fmt), |
220 | |||
221 | FILTER_OTHER | ||
208 | ); | 222 | ); |
209 | 223 | ||
210 | FTRACE_ENTRY(print, print_entry, | 224 | FTRACE_ENTRY(print, print_entry, |
@@ -217,7 +231,9 @@ FTRACE_ENTRY(print, print_entry, | |||
217 | ), | 231 | ), |
218 | 232 | ||
219 | F_printk("%08lx %s", | 233 | F_printk("%08lx %s", |
220 | __entry->ip, __entry->buf) | 234 | __entry->ip, __entry->buf), |
235 | |||
236 | FILTER_OTHER | ||
221 | ); | 237 | ); |
222 | 238 | ||
223 | FTRACE_ENTRY(mmiotrace_rw, trace_mmiotrace_rw, | 239 | FTRACE_ENTRY(mmiotrace_rw, trace_mmiotrace_rw, |
@@ -236,7 +252,9 @@ FTRACE_ENTRY(mmiotrace_rw, trace_mmiotrace_rw, | |||
236 | 252 | ||
237 | F_printk("%lx %lx %lx %d %x %x", | 253 | F_printk("%lx %lx %lx %d %x %x", |
238 | (unsigned long)__entry->phys, __entry->value, __entry->pc, | 254 | (unsigned long)__entry->phys, __entry->value, __entry->pc, |
239 | __entry->map_id, __entry->opcode, __entry->width) | 255 | __entry->map_id, __entry->opcode, __entry->width), |
256 | |||
257 | FILTER_OTHER | ||
240 | ); | 258 | ); |
241 | 259 | ||
242 | FTRACE_ENTRY(mmiotrace_map, trace_mmiotrace_map, | 260 | FTRACE_ENTRY(mmiotrace_map, trace_mmiotrace_map, |
@@ -254,7 +272,9 @@ FTRACE_ENTRY(mmiotrace_map, trace_mmiotrace_map, | |||
254 | 272 | ||
255 | F_printk("%lx %lx %lx %d %x", | 273 | F_printk("%lx %lx %lx %d %x", |
256 | (unsigned long)__entry->phys, __entry->virt, __entry->len, | 274 | (unsigned long)__entry->phys, __entry->virt, __entry->len, |
257 | __entry->map_id, __entry->opcode) | 275 | __entry->map_id, __entry->opcode), |
276 | |||
277 | FILTER_OTHER | ||
258 | ); | 278 | ); |
259 | 279 | ||
260 | 280 | ||
@@ -274,6 +294,8 @@ FTRACE_ENTRY(branch, trace_branch, | |||
274 | 294 | ||
275 | F_printk("%u:%s:%s (%u)", | 295 | F_printk("%u:%s:%s (%u)", |
276 | __entry->line, | 296 | __entry->line, |
277 | __entry->func, __entry->file, __entry->correct) | 297 | __entry->func, __entry->file, __entry->correct), |
298 | |||
299 | FILTER_OTHER | ||
278 | ); | 300 | ); |
279 | 301 | ||