aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-01-06 17:27:11 -0500
committerSteven Rostedt <rostedt@goodmis.org>2010-01-06 18:09:57 -0500
commitd931369b74b3d6f2044f595af6f3dd074f65d9cf (patch)
treeae60bd92388f278d32f659b7ce5ff20a229e0bb1 /kernel/trace/trace.c
parentdfaa9e2c5707b2c217c0121aac796e0fa3051482 (diff)
tracing: Add stack dump to trace_printk if stacktrace option is set
If the ftrace stacktrace option is set, then add the stack dumps to trace_printk. Requested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index abdd333a0825..5314c90bbc83 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1392,8 +1392,10 @@ int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
1392 entry->fmt = fmt; 1392 entry->fmt = fmt;
1393 1393
1394 memcpy(entry->buf, trace_buf, sizeof(u32) * len); 1394 memcpy(entry->buf, trace_buf, sizeof(u32) * len);
1395 if (!filter_check_discard(call, entry, buffer, event)) 1395 if (!filter_check_discard(call, entry, buffer, event)) {
1396 ring_buffer_unlock_commit(buffer, event); 1396 ring_buffer_unlock_commit(buffer, event);
1397 ftrace_trace_stack(buffer, flags, 6, pc);
1398 }
1397 1399
1398out_unlock: 1400out_unlock:
1399 arch_spin_unlock(&trace_buf_lock); 1401 arch_spin_unlock(&trace_buf_lock);
@@ -1466,8 +1468,10 @@ int trace_array_vprintk(struct trace_array *tr,
1466 1468
1467 memcpy(&entry->buf, trace_buf, len); 1469 memcpy(&entry->buf, trace_buf, len);
1468 entry->buf[len] = '\0'; 1470 entry->buf[len] = '\0';
1469 if (!filter_check_discard(call, entry, buffer, event)) 1471 if (!filter_check_discard(call, entry, buffer, event)) {
1470 ring_buffer_unlock_commit(buffer, event); 1472 ring_buffer_unlock_commit(buffer, event);
1473 ftrace_trace_stack(buffer, irq_flags, 6, pc);
1474 }
1471 1475
1472 out_unlock: 1476 out_unlock:
1473 arch_spin_unlock(&trace_buf_lock); 1477 arch_spin_unlock(&trace_buf_lock);