aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2008-05-12 15:20:46 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 14:42:01 -0400
commitb3806b4316306dc9c542eff6c23d7d42918f3504 (patch)
tree804786b94728c42930956f1fd8bbcabbba0c7412 /kernel/trace/trace.h
parent214023c3d13a71525e463b5e54e360b926b4dc90 (diff)
ftrace: user run time file reading
This patch creates a file called trace_pipe in the tracing debug directory. This file is a consumer of the trace buffers. This means that reads of this file consumes the entries from the trace buffers so that they will not be read a second time, as contrast to the static buffers latency_trace and trace. Reading from the trace_pipe will remove the entries from trace and latency_trace too. The advantage that trace_pipe has is that it can record live traces. It will block when there is nothing in the buffer, and read the entries as they are entered. An EOF happens when tracing is disabled (tracing_enabled = 0). Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index f5b32ca0b457..29a7ea59de50 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -55,6 +55,7 @@ struct trace_entry {
55struct trace_array_cpu { 55struct trace_array_cpu {
56 struct list_head trace_pages; 56 struct list_head trace_pages;
57 atomic_t disabled; 57 atomic_t disabled;
58 spinlock_t lock;
58 cycle_t time_offset; 59 cycle_t time_offset;
59 60
60 /* these fields get copied into max-trace: */ 61 /* these fields get copied into max-trace: */
@@ -88,6 +89,7 @@ struct trace_array {
88 long ctrl; 89 long ctrl;
89 int cpu; 90 int cpu;
90 cycle_t time_start; 91 cycle_t time_start;
92 struct task_struct *waiter;
91 struct trace_array_cpu *data[NR_CPUS]; 93 struct trace_array_cpu *data[NR_CPUS];
92}; 94};
93 95