Skip to content

Commit eb7beb5

Browse files
committed
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>
1 parent f376bf5 commit eb7beb5

7 files changed

Lines changed: 0 additions & 163 deletions

File tree

‎include/linux/kernel.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,6 @@ extern void tracing_start(void);
508508
extern void tracing_stop(void);
509509
extern void ftrace_off_permanent(void);
510510

511-
extern void
512-
ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3);
513-
514511
static inline void __attribute__ ((format (printf, 1, 2)))
515512
____trace_printk_check_format(const char *fmt, ...)
516513
{
@@ -586,8 +583,6 @@ __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap);
586583

587584
extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode);
588585
#else
589-
static inline void
590-
ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
591586
static inline int
592587
trace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
593588

‎include/linux/sched.h‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2434,18 +2434,6 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
24342434

24352435
#endif /* CONFIG_SMP */
24362436

2437-
#ifdef CONFIG_TRACING
2438-
extern void
2439-
__trace_special(void *__tr, void *__data,
2440-
unsigned long arg1, unsigned long arg2, unsigned long arg3);
2441-
#else
2442-
static inline void
2443-
__trace_special(void *__tr, void *__data,
2444-
unsigned long arg1, unsigned long arg2, unsigned long arg3)
2445-
{
2446-
}
2447-
#endif
2448-
24492437
extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask);
24502438
extern long sched_getaffinity(pid_t pid, struct cpumask *mask);
24512439

‎kernel/trace/trace.c‎

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,61 +1331,6 @@ static void __trace_userstack(struct trace_array *tr, unsigned long flags)
13311331

13321332
#endif /* CONFIG_STACKTRACE */
13331333

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-
13891334
/**
13901335
* trace_vbprintk - write binary msg to tracing buffer
13911336
*

‎kernel/trace/trace.h‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ enum trace_type {
2222
TRACE_STACK,
2323
TRACE_PRINT,
2424
TRACE_BPRINT,
25-
TRACE_SPECIAL,
2625
TRACE_MMIO_RW,
2726
TRACE_MMIO_MAP,
2827
TRACE_BRANCH,
@@ -189,7 +188,6 @@ extern void __ftrace_bad_type(void);
189188
IF_ASSIGN(var, ent, struct userstack_entry, TRACE_USER_STACK);\
190189
IF_ASSIGN(var, ent, struct print_entry, TRACE_PRINT); \
191190
IF_ASSIGN(var, ent, struct bprint_entry, TRACE_BPRINT); \
192-
IF_ASSIGN(var, ent, struct special_entry, 0); \
193191
IF_ASSIGN(var, ent, struct trace_mmiotrace_rw, \
194192
TRACE_MMIO_RW); \
195193
IF_ASSIGN(var, ent, struct trace_mmiotrace_map, \
@@ -332,11 +330,6 @@ void tracing_sched_wakeup_trace(struct trace_array *tr,
332330
struct task_struct *wakee,
333331
struct task_struct *cur,
334332
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);
340333
void trace_function(struct trace_array *tr,
341334
unsigned long ip,
342335
unsigned long parent_ip,

‎kernel/trace/trace_entries.h‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -150,23 +150,6 @@ FTRACE_ENTRY_DUP(wakeup, ctx_switch_entry,
150150
)
151151
);
152152

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-
170153
/*
171154
* Stack-trace entry:
172155
*/

‎kernel/trace/trace_output.c‎

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,65 +1069,6 @@ static struct trace_event trace_wake_event = {
10691069
.funcs = &trace_wake_funcs,
10701070
};
10711071

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-
11311072
/* TRACE_STACK */
11321073

11331074
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,
11611102

11621103
static struct trace_event_functions trace_stack_funcs = {
11631104
.trace = trace_stack_print,
1164-
.raw = trace_special_print,
1165-
.hex = trace_special_hex,
1166-
.binary = trace_special_bin,
11671105
};
11681106

11691107
static struct trace_event trace_stack_event = {
@@ -1194,9 +1132,6 @@ static enum print_line_t trace_user_stack_print(struct trace_iterator *iter,
11941132

11951133
static struct trace_event_functions trace_user_stack_funcs = {
11961134
.trace = trace_user_stack_print,
1197-
.raw = trace_special_print,
1198-
.hex = trace_special_hex,
1199-
.binary = trace_special_bin,
12001135
};
12011136

12021137
static struct trace_event trace_user_stack_event = {
@@ -1314,7 +1249,6 @@ static struct trace_event *events[] __initdata = {
13141249
&trace_fn_event,
13151250
&trace_ctx_event,
13161251
&trace_wake_event,
1317-
&trace_special_event,
13181252
&trace_stack_event,
13191253
&trace_user_stack_event,
13201254
&trace_bprint_event,

‎kernel/trace/trace_selftest.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ static inline int trace_valid_entry(struct trace_entry *entry)
1313
case TRACE_WAKE:
1414
case TRACE_STACK:
1515
case TRACE_PRINT:
16-
case TRACE_SPECIAL:
1716
case TRACE_BRANCH:
1817
case TRACE_GRAPH_ENT:
1918
case TRACE_GRAPH_RET:

0 commit comments

Comments
 (0)