Commit 40ce74f1 authored by Steven Rostedt's avatar Steven Rostedt

tracing: remove recording function depth from trace_printk

The function depth in trace_printk was to facilitate the function
graph output. Now that the function graph calculates the depth within
the trace output, we no longer need to record the depth when the
trace_printk is called.
Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
parent 2fbcdb35
...@@ -1194,7 +1194,7 @@ void trace_graph_return(struct ftrace_graph_ret *trace) ...@@ -1194,7 +1194,7 @@ void trace_graph_return(struct ftrace_graph_ret *trace)
* trace_vbprintk - write binary msg to tracing buffer * trace_vbprintk - write binary msg to tracing buffer
* *
*/ */
int trace_vbprintk(unsigned long ip, int depth, const char *fmt, va_list args) int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
{ {
static raw_spinlock_t trace_buf_lock = static raw_spinlock_t trace_buf_lock =
(raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED; (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED;
...@@ -1236,7 +1236,6 @@ int trace_vbprintk(unsigned long ip, int depth, const char *fmt, va_list args) ...@@ -1236,7 +1236,6 @@ int trace_vbprintk(unsigned long ip, int depth, const char *fmt, va_list args)
goto out_unlock; goto out_unlock;
entry = ring_buffer_event_data(event); entry = ring_buffer_event_data(event);
entry->ip = ip; entry->ip = ip;
entry->depth = depth;
entry->fmt = fmt; entry->fmt = fmt;
memcpy(entry->buf, trace_buf, sizeof(u32) * len); memcpy(entry->buf, trace_buf, sizeof(u32) * len);
...@@ -1254,7 +1253,7 @@ int trace_vbprintk(unsigned long ip, int depth, const char *fmt, va_list args) ...@@ -1254,7 +1253,7 @@ int trace_vbprintk(unsigned long ip, int depth, const char *fmt, va_list args)
} }
EXPORT_SYMBOL_GPL(trace_vbprintk); EXPORT_SYMBOL_GPL(trace_vbprintk);
int trace_vprintk(unsigned long ip, int depth, const char *fmt, va_list args) int trace_vprintk(unsigned long ip, const char *fmt, va_list args)
{ {
static raw_spinlock_t trace_buf_lock = __RAW_SPIN_LOCK_UNLOCKED; static raw_spinlock_t trace_buf_lock = __RAW_SPIN_LOCK_UNLOCKED;
static char trace_buf[TRACE_BUF_SIZE]; static char trace_buf[TRACE_BUF_SIZE];
...@@ -1291,7 +1290,6 @@ int trace_vprintk(unsigned long ip, int depth, const char *fmt, va_list args) ...@@ -1291,7 +1290,6 @@ int trace_vprintk(unsigned long ip, int depth, const char *fmt, va_list args)
goto out_unlock; goto out_unlock;
entry = ring_buffer_event_data(event); entry = ring_buffer_event_data(event);
entry->ip = ip; entry->ip = ip;
entry->depth = depth;
memcpy(&entry->buf, trace_buf, len); memcpy(&entry->buf, trace_buf, len);
entry->buf[len] = 0; entry->buf[len] = 0;
...@@ -3140,7 +3138,7 @@ static int mark_printk(const char *fmt, ...) ...@@ -3140,7 +3138,7 @@ static int mark_printk(const char *fmt, ...)
int ret; int ret;
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
ret = trace_vprintk(0, -1, fmt, args); ret = trace_vprintk(0, fmt, args);
va_end(args); va_end(args);
return ret; return ret;
} }
......
...@@ -123,7 +123,6 @@ struct userstack_entry { ...@@ -123,7 +123,6 @@ struct userstack_entry {
struct bprint_entry { struct bprint_entry {
struct trace_entry ent; struct trace_entry ent;
unsigned long ip; unsigned long ip;
int depth;
const char *fmt; const char *fmt;
u32 buf[]; u32 buf[];
}; };
...@@ -131,7 +130,6 @@ struct bprint_entry { ...@@ -131,7 +130,6 @@ struct bprint_entry {
struct print_entry { struct print_entry {
struct trace_entry ent; struct trace_entry ent;
unsigned long ip; unsigned long ip;
int depth;
char buf[]; char buf[];
}; };
...@@ -598,9 +596,9 @@ extern int trace_selftest_startup_branch(struct tracer *trace, ...@@ -598,9 +596,9 @@ extern int trace_selftest_startup_branch(struct tracer *trace,
extern void *head_page(struct trace_array_cpu *data); extern void *head_page(struct trace_array_cpu *data);
extern long ns2usecs(cycle_t nsec); extern long ns2usecs(cycle_t nsec);
extern int extern int
trace_vbprintk(unsigned long ip, int depth, const char *fmt, va_list args); trace_vbprintk(unsigned long ip, const char *fmt, va_list args);
extern int extern int
trace_vprintk(unsigned long ip, int depth, const char *fmt, va_list args); trace_vprintk(unsigned long ip, const char *fmt, va_list args);
extern unsigned long trace_flags; extern unsigned long trace_flags;
......
...@@ -105,7 +105,6 @@ TRACE_EVENT_FORMAT(user_stack, TRACE_USER_STACK, userstack_entry, ignore, ...@@ -105,7 +105,6 @@ TRACE_EVENT_FORMAT(user_stack, TRACE_USER_STACK, userstack_entry, ignore,
TRACE_EVENT_FORMAT(bprint, TRACE_BPRINT, bprint_entry, ignore, TRACE_EVENT_FORMAT(bprint, TRACE_BPRINT, bprint_entry, ignore,
TRACE_STRUCT( TRACE_STRUCT(
TRACE_FIELD(unsigned long, ip, ip) TRACE_FIELD(unsigned long, ip, ip)
TRACE_FIELD(unsigned int, depth, depth)
TRACE_FIELD(char *, fmt, fmt) TRACE_FIELD(char *, fmt, fmt)
TRACE_FIELD_ZERO_CHAR(buf) TRACE_FIELD_ZERO_CHAR(buf)
), ),
...@@ -115,7 +114,6 @@ TRACE_EVENT_FORMAT(bprint, TRACE_BPRINT, bprint_entry, ignore, ...@@ -115,7 +114,6 @@ TRACE_EVENT_FORMAT(bprint, TRACE_BPRINT, bprint_entry, ignore,
TRACE_EVENT_FORMAT(print, TRACE_PRINT, print_entry, ignore, TRACE_EVENT_FORMAT(print, TRACE_PRINT, print_entry, ignore,
TRACE_STRUCT( TRACE_STRUCT(
TRACE_FIELD(unsigned long, ip, ip) TRACE_FIELD(unsigned long, ip, ip)
TRACE_FIELD(unsigned int, depth, depth)
TRACE_FIELD_ZERO_CHAR(buf) TRACE_FIELD_ZERO_CHAR(buf)
), ),
TP_RAW_FMT("%08lx (%d) fmt:%p %s") TP_RAW_FMT("%08lx (%d) fmt:%p %s")
......
...@@ -359,5 +359,5 @@ void mmio_trace_mapping(struct mmiotrace_map *map) ...@@ -359,5 +359,5 @@ void mmio_trace_mapping(struct mmiotrace_map *map)
int mmio_trace_printk(const char *fmt, va_list args) int mmio_trace_printk(const char *fmt, va_list args)
{ {
return trace_vprintk(0, -1, fmt, args); return trace_vprintk(0, fmt, args);
} }
...@@ -112,7 +112,7 @@ int __trace_bprintk(unsigned long ip, const char *fmt, ...) ...@@ -112,7 +112,7 @@ int __trace_bprintk(unsigned long ip, const char *fmt, ...)
return 0; return 0;
va_start(ap, fmt); va_start(ap, fmt);
ret = trace_vbprintk(ip, task_curr_ret_stack(current), fmt, ap); ret = trace_vbprintk(ip, fmt, ap);
va_end(ap); va_end(ap);
return ret; return ret;
} }
...@@ -126,7 +126,7 @@ int __ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap) ...@@ -126,7 +126,7 @@ int __ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap)
if (!(trace_flags & TRACE_ITER_PRINTK)) if (!(trace_flags & TRACE_ITER_PRINTK))
return 0; return 0;
return trace_vbprintk(ip, task_curr_ret_stack(current), fmt, ap); return trace_vbprintk(ip, fmt, ap);
} }
EXPORT_SYMBOL_GPL(__ftrace_vbprintk); EXPORT_SYMBOL_GPL(__ftrace_vbprintk);
...@@ -139,7 +139,7 @@ int __trace_printk(unsigned long ip, const char *fmt, ...) ...@@ -139,7 +139,7 @@ int __trace_printk(unsigned long ip, const char *fmt, ...)
return 0; return 0;
va_start(ap, fmt); va_start(ap, fmt);
ret = trace_vprintk(ip, task_curr_ret_stack(current), fmt, ap); ret = trace_vprintk(ip, fmt, ap);
va_end(ap); va_end(ap);
return ret; return ret;
} }
...@@ -150,7 +150,7 @@ int __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap) ...@@ -150,7 +150,7 @@ int __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap)
if (!(trace_flags & TRACE_ITER_PRINTK)) if (!(trace_flags & TRACE_ITER_PRINTK))
return 0; return 0;
return trace_vprintk(ip, task_curr_ret_stack(current), fmt, ap); return trace_vprintk(ip, fmt, ap);
} }
EXPORT_SYMBOL_GPL(__ftrace_vprintk); EXPORT_SYMBOL_GPL(__ftrace_vprintk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment