diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2010-07-15 18:50:03 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-07-20 08:31:07 -0400 |
commit | eb7beb5c09af75494234ea6acd09d0a647cf7338 (patch) | |
tree | ab76cb3a6c1f1ea9befbbc72d0f997c03423dd57 /kernel | |
parent | f376bf5ffbad863d4bc3b2586b7e34cdf756ad17 (diff) |
tracing: Remove special traces
Special traces type was only used by sysprof. Lets remove it now
that sysprof ftrace plugin has been dropped.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace.c | 55 | ||||
-rw-r--r-- | kernel/trace/trace.h | 7 | ||||
-rw-r--r-- | kernel/trace/trace_entries.h | 17 | ||||
-rw-r--r-- | kernel/trace/trace_output.c | 66 | ||||
-rw-r--r-- | kernel/trace/trace_selftest.c | 1 |
5 files changed, 0 insertions, 146 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 78a49e67f7db..d9a4aa02c384 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -1331,61 +1331,6 @@ static void __trace_userstack(struct trace_array *tr, unsigned long flags) | |||
1331 | 1331 | ||
1332 | #endif /* CONFIG_STACKTRACE */ | 1332 | #endif /* CONFIG_STACKTRACE */ |
1333 | 1333 | ||
1334 | static void | ||
1335 | ftrace_trace_special(void *__tr, | ||
1336 | unsigned long arg1, unsigned long arg2, unsigned long arg3, | ||
1337 | int pc) | ||
1338 | { | ||
1339 | struct ftrace_event_call *call = &event_special; | ||
1340 | struct ring_buffer_event *event; | ||
1341 | struct trace_array *tr = __tr; | ||
1342 | struct ring_buffer *buffer = tr->buffer; | ||
1343 | struct special_entry *entry; | ||
1344 | |||
1345 | event = trace_buffer_lock_reserve(buffer, TRACE_SPECIAL, | ||
1346 | sizeof(*entry), 0, pc); | ||
1347 | if (!event) | ||
1348 | return; | ||
1349 | entry = ring_buffer_event_data(event); | ||
1350 | entry->arg1 = arg1; | ||
1351 | entry->arg2 = arg2; | ||
1352 | entry->arg3 = arg3; | ||
1353 | |||
1354 | if (!filter_check_discard(call, entry, buffer, event)) | ||
1355 | trace_buffer_unlock_commit(buffer, event, 0, pc); | ||
1356 | } | ||
1357 | |||
1358 | void | ||
1359 | __trace_special(void *__tr, void *__data, | ||
1360 | unsigned long arg1, unsigned long arg2, unsigned long arg3) | ||
1361 | { | ||
1362 | ftrace_trace_special(__tr, arg1, arg2, arg3, preempt_count()); | ||
1363 | } | ||
1364 | |||
1365 | void | ||
1366 | ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) | ||
1367 | { | ||
1368 | struct trace_array *tr = &global_trace; | ||
1369 | struct trace_array_cpu *data; | ||
1370 | unsigned long flags; | ||
1371 | int cpu; | ||
1372 | int pc; | ||
1373 | |||
1374 | if (tracing_disabled) | ||
1375 | return; | ||
1376 | |||
1377 | pc = preempt_count(); | ||
1378 | local_irq_save(flags); | ||
1379 | cpu = raw_smp_processor_id(); | ||
1380 | data = tr->data[cpu]; | ||
1381 | |||
1382 | if (likely(atomic_inc_return(&data->disabled) == 1)) | ||
1383 | ftrace_trace_special(tr, arg1, arg2, arg3, pc); | ||
1384 | |||
1385 | atomic_dec(&data->disabled); | ||
1386 | local_irq_restore(flags); | ||
1387 | } | ||
1388 | |||
1389 | /** | 1334 | /** |
1390 | * trace_vbprintk - write binary msg to tracing buffer | 1335 | * trace_vbprintk - write binary msg to tracing buffer |
1391 | * | 1336 | * |
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 2114b4c1150f..638a5887e2ec 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -22,7 +22,6 @@ enum trace_type { | |||
22 | TRACE_STACK, | 22 | TRACE_STACK, |
23 | TRACE_PRINT, | 23 | TRACE_PRINT, |
24 | TRACE_BPRINT, | 24 | TRACE_BPRINT, |
25 | TRACE_SPECIAL, | ||
26 | TRACE_MMIO_RW, | 25 | TRACE_MMIO_RW, |
27 | TRACE_MMIO_MAP, | 26 | TRACE_MMIO_MAP, |
28 | TRACE_BRANCH, | 27 | TRACE_BRANCH, |
@@ -189,7 +188,6 @@ extern void __ftrace_bad_type(void); | |||
189 | IF_ASSIGN(var, ent, struct userstack_entry, TRACE_USER_STACK);\ | 188 | IF_ASSIGN(var, ent, struct userstack_entry, TRACE_USER_STACK);\ |
190 | IF_ASSIGN(var, ent, struct print_entry, TRACE_PRINT); \ | 189 | IF_ASSIGN(var, ent, struct print_entry, TRACE_PRINT); \ |
191 | IF_ASSIGN(var, ent, struct bprint_entry, TRACE_BPRINT); \ | 190 | IF_ASSIGN(var, ent, struct bprint_entry, TRACE_BPRINT); \ |
192 | IF_ASSIGN(var, ent, struct special_entry, 0); \ | ||
193 | IF_ASSIGN(var, ent, struct trace_mmiotrace_rw, \ | 191 | IF_ASSIGN(var, ent, struct trace_mmiotrace_rw, \ |
194 | TRACE_MMIO_RW); \ | 192 | TRACE_MMIO_RW); \ |
195 | IF_ASSIGN(var, ent, struct trace_mmiotrace_map, \ | 193 | IF_ASSIGN(var, ent, struct trace_mmiotrace_map, \ |
@@ -332,11 +330,6 @@ void tracing_sched_wakeup_trace(struct trace_array *tr, | |||
332 | struct task_struct *wakee, | 330 | struct task_struct *wakee, |
333 | struct task_struct *cur, | 331 | struct task_struct *cur, |
334 | unsigned long flags, int pc); | 332 | unsigned long flags, int pc); |
335 | void trace_special(struct trace_array *tr, | ||
336 | struct trace_array_cpu *data, | ||
337 | unsigned long arg1, | ||
338 | unsigned long arg2, | ||
339 | unsigned long arg3, int pc); | ||
340 | void trace_function(struct trace_array *tr, | 333 | void trace_function(struct trace_array *tr, |
341 | unsigned long ip, | 334 | unsigned long ip, |
342 | unsigned long parent_ip, | 335 | unsigned long parent_ip, |
diff --git a/kernel/trace/trace_entries.h b/kernel/trace/trace_entries.h index 84128371f254..e3dfecaf13e6 100644 --- a/kernel/trace/trace_entries.h +++ b/kernel/trace/trace_entries.h | |||
@@ -151,23 +151,6 @@ FTRACE_ENTRY_DUP(wakeup, ctx_switch_entry, | |||
151 | ); | 151 | ); |
152 | 152 | ||
153 | /* | 153 | /* |
154 | * Special (free-form) trace entry: | ||
155 | */ | ||
156 | FTRACE_ENTRY(special, special_entry, | ||
157 | |||
158 | TRACE_SPECIAL, | ||
159 | |||
160 | F_STRUCT( | ||
161 | __field( unsigned long, arg1 ) | ||
162 | __field( unsigned long, arg2 ) | ||
163 | __field( unsigned long, arg3 ) | ||
164 | ), | ||
165 | |||
166 | F_printk("(%08lx) (%08lx) (%08lx)", | ||
167 | __entry->arg1, __entry->arg2, __entry->arg3) | ||
168 | ); | ||
169 | |||
170 | /* | ||
171 | * Stack-trace entry: | 154 | * Stack-trace entry: |
172 | */ | 155 | */ |
173 | 156 | ||
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 57c1b4596470..a46197b80b7f 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -1069,65 +1069,6 @@ static struct trace_event trace_wake_event = { | |||
1069 | .funcs = &trace_wake_funcs, | 1069 | .funcs = &trace_wake_funcs, |
1070 | }; | 1070 | }; |
1071 | 1071 | ||
1072 | /* TRACE_SPECIAL */ | ||
1073 | static enum print_line_t trace_special_print(struct trace_iterator *iter, | ||
1074 | int flags, struct trace_event *event) | ||
1075 | { | ||
1076 | struct special_entry *field; | ||
1077 | |||
1078 | trace_assign_type(field, iter->ent); | ||
1079 | |||
1080 | if (!trace_seq_printf(&iter->seq, "# %ld %ld %ld\n", | ||
1081 | field->arg1, | ||
1082 | field->arg2, | ||
1083 | field->arg3)) | ||
1084 | return TRACE_TYPE_PARTIAL_LINE; | ||
1085 | |||
1086 | return TRACE_TYPE_HANDLED; | ||
1087 | } | ||
1088 | |||
1089 | static enum print_line_t trace_special_hex(struct trace_iterator *iter, | ||
1090 | int flags, struct trace_event *event) | ||
1091 | { | ||
1092 | struct special_entry *field; | ||
1093 | struct trace_seq *s = &iter->seq; | ||
1094 | |||
1095 | trace_assign_type(field, iter->ent); | ||
1096 | |||
1097 | SEQ_PUT_HEX_FIELD_RET(s, field->arg1); | ||
1098 | SEQ_PUT_HEX_FIELD_RET(s, field->arg2); | ||
1099 | SEQ_PUT_HEX_FIELD_RET(s, field->arg3); | ||
1100 | |||
1101 | return TRACE_TYPE_HANDLED; | ||
1102 | } | ||
1103 | |||
1104 | static enum print_line_t trace_special_bin(struct trace_iterator *iter, | ||
1105 | int flags, struct trace_event *event) | ||
1106 | { | ||
1107 | struct special_entry *field; | ||
1108 | struct trace_seq *s = &iter->seq; | ||
1109 | |||
1110 | trace_assign_type(field, iter->ent); | ||
1111 | |||
1112 | SEQ_PUT_FIELD_RET(s, field->arg1); | ||
1113 | SEQ_PUT_FIELD_RET(s, field->arg2); | ||
1114 | SEQ_PUT_FIELD_RET(s, field->arg3); | ||
1115 | |||
1116 | return TRACE_TYPE_HANDLED; | ||
1117 | } | ||
1118 | |||
1119 | static struct trace_event_functions trace_special_funcs = { | ||
1120 | .trace = trace_special_print, | ||
1121 | .raw = trace_special_print, | ||
1122 | .hex = trace_special_hex, | ||
1123 | .binary = trace_special_bin, | ||
1124 | }; | ||
1125 | |||
1126 | static struct trace_event trace_special_event = { | ||
1127 | .type = TRACE_SPECIAL, | ||
1128 | .funcs = &trace_special_funcs, | ||
1129 | }; | ||
1130 | |||
1131 | /* TRACE_STACK */ | 1072 | /* TRACE_STACK */ |
1132 | 1073 | ||
1133 | static enum print_line_t trace_stack_print(struct trace_iterator *iter, | 1074 | static enum print_line_t trace_stack_print(struct trace_iterator *iter, |
@@ -1161,9 +1102,6 @@ static enum print_line_t trace_stack_print(struct trace_iterator *iter, | |||
1161 | 1102 | ||
1162 | static struct trace_event_functions trace_stack_funcs = { | 1103 | static struct trace_event_functions trace_stack_funcs = { |
1163 | .trace = trace_stack_print, | 1104 | .trace = trace_stack_print, |
1164 | .raw = trace_special_print, | ||
1165 | .hex = trace_special_hex, | ||
1166 | .binary = trace_special_bin, | ||
1167 | }; | 1105 | }; |
1168 | 1106 | ||
1169 | static struct trace_event trace_stack_event = { | 1107 | static struct trace_event trace_stack_event = { |
@@ -1194,9 +1132,6 @@ static enum print_line_t trace_user_stack_print(struct trace_iterator *iter, | |||
1194 | 1132 | ||
1195 | static struct trace_event_functions trace_user_stack_funcs = { | 1133 | static struct trace_event_functions trace_user_stack_funcs = { |
1196 | .trace = trace_user_stack_print, | 1134 | .trace = trace_user_stack_print, |
1197 | .raw = trace_special_print, | ||
1198 | .hex = trace_special_hex, | ||
1199 | .binary = trace_special_bin, | ||
1200 | }; | 1135 | }; |
1201 | 1136 | ||
1202 | static struct trace_event trace_user_stack_event = { | 1137 | static struct trace_event trace_user_stack_event = { |
@@ -1314,7 +1249,6 @@ static struct trace_event *events[] __initdata = { | |||
1314 | &trace_fn_event, | 1249 | &trace_fn_event, |
1315 | &trace_ctx_event, | 1250 | &trace_ctx_event, |
1316 | &trace_wake_event, | 1251 | &trace_wake_event, |
1317 | &trace_special_event, | ||
1318 | &trace_stack_event, | 1252 | &trace_stack_event, |
1319 | &trace_user_stack_event, | 1253 | &trace_user_stack_event, |
1320 | &trace_bprint_event, | 1254 | &trace_bprint_event, |
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c index 6ed05ee6cbc7..155a415b3209 100644 --- a/kernel/trace/trace_selftest.c +++ b/kernel/trace/trace_selftest.c | |||
@@ -13,7 +13,6 @@ static inline int trace_valid_entry(struct trace_entry *entry) | |||
13 | case TRACE_WAKE: | 13 | case TRACE_WAKE: |
14 | case TRACE_STACK: | 14 | case TRACE_STACK: |
15 | case TRACE_PRINT: | 15 | case TRACE_PRINT: |
16 | case TRACE_SPECIAL: | ||
17 | case TRACE_BRANCH: | 16 | case TRACE_BRANCH: |
18 | case TRACE_GRAPH_ENT: | 17 | case TRACE_GRAPH_ENT: |
19 | case TRACE_GRAPH_RET: | 18 | case TRACE_GRAPH_RET: |