aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-19 14:03:53 -0400
committerSteven Rostedt <srostedt@redhat.com>2009-03-19 15:58:47 -0400
commit40ce74f19c28077550646c76d96a075bf312e461 (patch)
treebd58d38b6ac806be6f59276f16d1e0758376fa1d
parent2fbcdb35aca614f9529a0e7d340146cf0b71684f (diff)
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: Steven Rostedt <srostedt@redhat.com>
-rw-r--r--kernel/trace/trace.c8
-rw-r--r--kernel/trace/trace.h6
-rw-r--r--kernel/trace/trace_event_types.h2
-rw-r--r--kernel/trace/trace_mmiotrace.c2
-rw-r--r--kernel/trace/trace_printk.c8
5 files changed, 10 insertions, 16 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index c637cb687cf2..f7f359d45823 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1194,7 +1194,7 @@ void trace_graph_return(struct ftrace_graph_ret *trace)
1194 * trace_vbprintk - write binary msg to tracing buffer 1194 * trace_vbprintk - write binary msg to tracing buffer
1195 * 1195 *
1196 */ 1196 */
1197int trace_vbprintk(unsigned long ip, int depth, const char *fmt, va_list args) 1197int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
1198{ 1198{
1199 static raw_spinlock_t trace_buf_lock = 1199 static raw_spinlock_t trace_buf_lock =
1200 (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED; 1200 (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 goto out_unlock; 1236 goto out_unlock;
1237 entry = ring_buffer_event_data(event); 1237 entry = ring_buffer_event_data(event);
1238 entry->ip = ip; 1238 entry->ip = ip;
1239 entry->depth = depth;
1240 entry->fmt = fmt; 1239 entry->fmt = fmt;
1241 1240
1242 memcpy(entry->buf, trace_buf, sizeof(u32) * len); 1241 memcpy(entry->buf, trace_buf, sizeof(u32) * len);
@@ -1254,7 +1253,7 @@ out:
1254} 1253}
1255EXPORT_SYMBOL_GPL(trace_vbprintk); 1254EXPORT_SYMBOL_GPL(trace_vbprintk);
1256 1255
1257int trace_vprintk(unsigned long ip, int depth, const char *fmt, va_list args) 1256int trace_vprintk(unsigned long ip, const char *fmt, va_list args)
1258{ 1257{
1259 static raw_spinlock_t trace_buf_lock = __RAW_SPIN_LOCK_UNLOCKED; 1258 static raw_spinlock_t trace_buf_lock = __RAW_SPIN_LOCK_UNLOCKED;
1260 static char trace_buf[TRACE_BUF_SIZE]; 1259 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 goto out_unlock; 1290 goto out_unlock;
1292 entry = ring_buffer_event_data(event); 1291 entry = ring_buffer_event_data(event);
1293 entry->ip = ip; 1292 entry->ip = ip;
1294 entry->depth = depth;
1295 1293
1296 memcpy(&entry->buf, trace_buf, len); 1294 memcpy(&entry->buf, trace_buf, len);
1297 entry->buf[len] = 0; 1295 entry->buf[len] = 0;
@@ -3140,7 +3138,7 @@ static int mark_printk(const char *fmt, ...)
3140 int ret; 3138 int ret;
3141 va_list args; 3139 va_list args;
3142 va_start(args, fmt); 3140 va_start(args, fmt);
3143 ret = trace_vprintk(0, -1, fmt, args); 3141 ret = trace_vprintk(0, fmt, args);
3144 va_end(args); 3142 va_end(args);
3145 return ret; 3143 return ret;
3146} 3144}
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 38276d1638e3..7c9a0cbf5dca 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -123,7 +123,6 @@ struct userstack_entry {
123struct bprint_entry { 123struct bprint_entry {
124 struct trace_entry ent; 124 struct trace_entry ent;
125 unsigned long ip; 125 unsigned long ip;
126 int depth;
127 const char *fmt; 126 const char *fmt;
128 u32 buf[]; 127 u32 buf[];
129}; 128};
@@ -131,7 +130,6 @@ struct bprint_entry {
131struct print_entry { 130struct print_entry {
132 struct trace_entry ent; 131 struct trace_entry ent;
133 unsigned long ip; 132 unsigned long ip;
134 int depth;
135 char buf[]; 133 char buf[];
136}; 134};
137 135
@@ -598,9 +596,9 @@ extern int trace_selftest_startup_branch(struct tracer *trace,
598extern void *head_page(struct trace_array_cpu *data); 596extern void *head_page(struct trace_array_cpu *data);
599extern long ns2usecs(cycle_t nsec); 597extern long ns2usecs(cycle_t nsec);
600extern int 598extern int
601trace_vbprintk(unsigned long ip, int depth, const char *fmt, va_list args); 599trace_vbprintk(unsigned long ip, const char *fmt, va_list args);
602extern int 600extern int
603trace_vprintk(unsigned long ip, int depth, const char *fmt, va_list args); 601trace_vprintk(unsigned long ip, const char *fmt, va_list args);
604 602
605extern unsigned long trace_flags; 603extern unsigned long trace_flags;
606 604
diff --git a/kernel/trace/trace_event_types.h b/kernel/trace/trace_event_types.h
index 019915063fe6..fd78bee71dd7 100644
--- a/kernel/trace/trace_event_types.h
+++ b/kernel/trace/trace_event_types.h
@@ -105,7 +105,6 @@ TRACE_EVENT_FORMAT(user_stack, TRACE_USER_STACK, userstack_entry, ignore,
105TRACE_EVENT_FORMAT(bprint, TRACE_BPRINT, bprint_entry, ignore, 105TRACE_EVENT_FORMAT(bprint, TRACE_BPRINT, bprint_entry, ignore,
106 TRACE_STRUCT( 106 TRACE_STRUCT(
107 TRACE_FIELD(unsigned long, ip, ip) 107 TRACE_FIELD(unsigned long, ip, ip)
108 TRACE_FIELD(unsigned int, depth, depth)
109 TRACE_FIELD(char *, fmt, fmt) 108 TRACE_FIELD(char *, fmt, fmt)
110 TRACE_FIELD_ZERO_CHAR(buf) 109 TRACE_FIELD_ZERO_CHAR(buf)
111 ), 110 ),
@@ -115,7 +114,6 @@ TRACE_EVENT_FORMAT(bprint, TRACE_BPRINT, bprint_entry, ignore,
115TRACE_EVENT_FORMAT(print, TRACE_PRINT, print_entry, ignore, 114TRACE_EVENT_FORMAT(print, TRACE_PRINT, print_entry, ignore,
116 TRACE_STRUCT( 115 TRACE_STRUCT(
117 TRACE_FIELD(unsigned long, ip, ip) 116 TRACE_FIELD(unsigned long, ip, ip)
118 TRACE_FIELD(unsigned int, depth, depth)
119 TRACE_FIELD_ZERO_CHAR(buf) 117 TRACE_FIELD_ZERO_CHAR(buf)
120 ), 118 ),
121 TP_RAW_FMT("%08lx (%d) fmt:%p %s") 119 TP_RAW_FMT("%08lx (%d) fmt:%p %s")
diff --git a/kernel/trace/trace_mmiotrace.c b/kernel/trace/trace_mmiotrace.c
index f095916e477f..8e37fcddd8b4 100644
--- a/kernel/trace/trace_mmiotrace.c
+++ b/kernel/trace/trace_mmiotrace.c
@@ -359,5 +359,5 @@ void mmio_trace_mapping(struct mmiotrace_map *map)
359 359
360int mmio_trace_printk(const char *fmt, va_list args) 360int mmio_trace_printk(const char *fmt, va_list args)
361{ 361{
362 return trace_vprintk(0, -1, fmt, args); 362 return trace_vprintk(0, fmt, args);
363} 363}
diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c
index 486785214e3e..eb81556107fe 100644
--- a/kernel/trace/trace_printk.c
+++ b/kernel/trace/trace_printk.c
@@ -112,7 +112,7 @@ int __trace_bprintk(unsigned long ip, const char *fmt, ...)
112 return 0; 112 return 0;
113 113
114 va_start(ap, fmt); 114 va_start(ap, fmt);
115 ret = trace_vbprintk(ip, task_curr_ret_stack(current), fmt, ap); 115 ret = trace_vbprintk(ip, fmt, ap);
116 va_end(ap); 116 va_end(ap);
117 return ret; 117 return ret;
118} 118}
@@ -126,7 +126,7 @@ int __ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap)
126 if (!(trace_flags & TRACE_ITER_PRINTK)) 126 if (!(trace_flags & TRACE_ITER_PRINTK))
127 return 0; 127 return 0;
128 128
129 return trace_vbprintk(ip, task_curr_ret_stack(current), fmt, ap); 129 return trace_vbprintk(ip, fmt, ap);
130} 130}
131EXPORT_SYMBOL_GPL(__ftrace_vbprintk); 131EXPORT_SYMBOL_GPL(__ftrace_vbprintk);
132 132
@@ -139,7 +139,7 @@ int __trace_printk(unsigned long ip, const char *fmt, ...)
139 return 0; 139 return 0;
140 140
141 va_start(ap, fmt); 141 va_start(ap, fmt);
142 ret = trace_vprintk(ip, task_curr_ret_stack(current), fmt, ap); 142 ret = trace_vprintk(ip, fmt, ap);
143 va_end(ap); 143 va_end(ap);
144 return ret; 144 return ret;
145} 145}
@@ -150,7 +150,7 @@ int __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap)
150 if (!(trace_flags & TRACE_ITER_PRINTK)) 150 if (!(trace_flags & TRACE_ITER_PRINTK))
151 return 0; 151 return 0;
152 152
153 return trace_vprintk(ip, task_curr_ret_stack(current), fmt, ap); 153 return trace_vprintk(ip, fmt, ap);
154} 154}
155EXPORT_SYMBOL_GPL(__ftrace_vprintk); 155EXPORT_SYMBOL_GPL(__ftrace_vprintk);
156 156