Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205318
b: refs/heads/master
c: eb7beb5
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker committed Jul 20, 2010
1 parent c6bd2f6 commit af94923
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 164 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f376bf5ffbad863d4bc3b2586b7e34cdf756ad17
refs/heads/master: eb7beb5c09af75494234ea6acd09d0a647cf7338
5 changes: 0 additions & 5 deletions trunk/include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,6 @@ extern void tracing_start(void);
extern void tracing_stop(void);
extern void ftrace_off_permanent(void);

extern void
ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3);

static inline void __attribute__ ((format (printf, 1, 2)))
____trace_printk_check_format(const char *fmt, ...)
{
Expand Down Expand Up @@ -586,8 +583,6 @@ __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap);

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

Expand Down
12 changes: 0 additions & 12 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -2434,18 +2434,6 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)

#endif /* CONFIG_SMP */

#ifdef CONFIG_TRACING
extern void
__trace_special(void *__tr, void *__data,
unsigned long arg1, unsigned long arg2, unsigned long arg3);
#else
static inline void
__trace_special(void *__tr, void *__data,
unsigned long arg1, unsigned long arg2, unsigned long arg3)
{
}
#endif

extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask);
extern long sched_getaffinity(pid_t pid, struct cpumask *mask);

Expand Down
55 changes: 0 additions & 55 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1331,61 +1331,6 @@ static void __trace_userstack(struct trace_array *tr, unsigned long flags)

#endif /* CONFIG_STACKTRACE */

static void
ftrace_trace_special(void *__tr,
unsigned long arg1, unsigned long arg2, unsigned long arg3,
int pc)
{
struct ftrace_event_call *call = &event_special;
struct ring_buffer_event *event;
struct trace_array *tr = __tr;
struct ring_buffer *buffer = tr->buffer;
struct special_entry *entry;

event = trace_buffer_lock_reserve(buffer, TRACE_SPECIAL,
sizeof(*entry), 0, pc);
if (!event)
return;
entry = ring_buffer_event_data(event);
entry->arg1 = arg1;
entry->arg2 = arg2;
entry->arg3 = arg3;

if (!filter_check_discard(call, entry, buffer, event))
trace_buffer_unlock_commit(buffer, event, 0, pc);
}

void
__trace_special(void *__tr, void *__data,
unsigned long arg1, unsigned long arg2, unsigned long arg3)
{
ftrace_trace_special(__tr, arg1, arg2, arg3, preempt_count());
}

void
ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3)
{
struct trace_array *tr = &global_trace;
struct trace_array_cpu *data;
unsigned long flags;
int cpu;
int pc;

if (tracing_disabled)
return;

pc = preempt_count();
local_irq_save(flags);
cpu = raw_smp_processor_id();
data = tr->data[cpu];

if (likely(atomic_inc_return(&data->disabled) == 1))
ftrace_trace_special(tr, arg1, arg2, arg3, pc);

atomic_dec(&data->disabled);
local_irq_restore(flags);
}

/**
* trace_vbprintk - write binary msg to tracing buffer
*
Expand Down
7 changes: 0 additions & 7 deletions trunk/kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ enum trace_type {
TRACE_STACK,
TRACE_PRINT,
TRACE_BPRINT,
TRACE_SPECIAL,
TRACE_MMIO_RW,
TRACE_MMIO_MAP,
TRACE_BRANCH,
Expand Down Expand Up @@ -189,7 +188,6 @@ extern void __ftrace_bad_type(void);
IF_ASSIGN(var, ent, struct userstack_entry, TRACE_USER_STACK);\
IF_ASSIGN(var, ent, struct print_entry, TRACE_PRINT); \
IF_ASSIGN(var, ent, struct bprint_entry, TRACE_BPRINT); \
IF_ASSIGN(var, ent, struct special_entry, 0); \
IF_ASSIGN(var, ent, struct trace_mmiotrace_rw, \
TRACE_MMIO_RW); \
IF_ASSIGN(var, ent, struct trace_mmiotrace_map, \
Expand Down Expand Up @@ -332,11 +330,6 @@ void tracing_sched_wakeup_trace(struct trace_array *tr,
struct task_struct *wakee,
struct task_struct *cur,
unsigned long flags, int pc);
void trace_special(struct trace_array *tr,
struct trace_array_cpu *data,
unsigned long arg1,
unsigned long arg2,
unsigned long arg3, int pc);
void trace_function(struct trace_array *tr,
unsigned long ip,
unsigned long parent_ip,
Expand Down
17 changes: 0 additions & 17 deletions trunk/kernel/trace/trace_entries.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,23 +150,6 @@ FTRACE_ENTRY_DUP(wakeup, ctx_switch_entry,
)
);

/*
* Special (free-form) trace entry:
*/
FTRACE_ENTRY(special, special_entry,

TRACE_SPECIAL,

F_STRUCT(
__field( unsigned long, arg1 )
__field( unsigned long, arg2 )
__field( unsigned long, arg3 )
),

F_printk("(%08lx) (%08lx) (%08lx)",
__entry->arg1, __entry->arg2, __entry->arg3)
);

/*
* Stack-trace entry:
*/
Expand Down
66 changes: 0 additions & 66 deletions trunk/kernel/trace/trace_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1069,65 +1069,6 @@ static struct trace_event trace_wake_event = {
.funcs = &trace_wake_funcs,
};

/* TRACE_SPECIAL */
static enum print_line_t trace_special_print(struct trace_iterator *iter,
int flags, struct trace_event *event)
{
struct special_entry *field;

trace_assign_type(field, iter->ent);

if (!trace_seq_printf(&iter->seq, "# %ld %ld %ld\n",
field->arg1,
field->arg2,
field->arg3))
return TRACE_TYPE_PARTIAL_LINE;

return TRACE_TYPE_HANDLED;
}

static enum print_line_t trace_special_hex(struct trace_iterator *iter,
int flags, struct trace_event *event)
{
struct special_entry *field;
struct trace_seq *s = &iter->seq;

trace_assign_type(field, iter->ent);

SEQ_PUT_HEX_FIELD_RET(s, field->arg1);
SEQ_PUT_HEX_FIELD_RET(s, field->arg2);
SEQ_PUT_HEX_FIELD_RET(s, field->arg3);

return TRACE_TYPE_HANDLED;
}

static enum print_line_t trace_special_bin(struct trace_iterator *iter,
int flags, struct trace_event *event)
{
struct special_entry *field;
struct trace_seq *s = &iter->seq;

trace_assign_type(field, iter->ent);

SEQ_PUT_FIELD_RET(s, field->arg1);
SEQ_PUT_FIELD_RET(s, field->arg2);
SEQ_PUT_FIELD_RET(s, field->arg3);

return TRACE_TYPE_HANDLED;
}

static struct trace_event_functions trace_special_funcs = {
.trace = trace_special_print,
.raw = trace_special_print,
.hex = trace_special_hex,
.binary = trace_special_bin,
};

static struct trace_event trace_special_event = {
.type = TRACE_SPECIAL,
.funcs = &trace_special_funcs,
};

/* TRACE_STACK */

static enum print_line_t trace_stack_print(struct trace_iterator *iter,
Expand Down Expand Up @@ -1161,9 +1102,6 @@ static enum print_line_t trace_stack_print(struct trace_iterator *iter,

static struct trace_event_functions trace_stack_funcs = {
.trace = trace_stack_print,
.raw = trace_special_print,
.hex = trace_special_hex,
.binary = trace_special_bin,
};

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

static struct trace_event_functions trace_user_stack_funcs = {
.trace = trace_user_stack_print,
.raw = trace_special_print,
.hex = trace_special_hex,
.binary = trace_special_bin,
};

static struct trace_event trace_user_stack_event = {
Expand Down Expand Up @@ -1314,7 +1249,6 @@ static struct trace_event *events[] __initdata = {
&trace_fn_event,
&trace_ctx_event,
&trace_wake_event,
&trace_special_event,
&trace_stack_event,
&trace_user_stack_event,
&trace_bprint_event,
Expand Down
1 change: 0 additions & 1 deletion trunk/kernel/trace/trace_selftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ static inline int trace_valid_entry(struct trace_entry *entry)
case TRACE_WAKE:
case TRACE_STACK:
case TRACE_PRINT:
case TRACE_SPECIAL:
case TRACE_BRANCH:
case TRACE_GRAPH_ENT:
case TRACE_GRAPH_RET:
Expand Down

0 comments on commit af94923

Please sign in to comment.