aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-08-01 12:26:40 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-14 04:35:15 -0400
commit2e2ca155cd2213b4f398031180fb3d399d5b7db9 (patch)
tree027295832950e23ac4edc84e43550d02e9a1acc6 /kernel/trace/trace.h
parentfed1939c64d2288938fdc1c367d49082da65e195 (diff)
ftrace: new continue entry - separate out from trace_entry
Some tracers will need to work with more than one entry. In order to do this the trace_entry structure was split into two fields. One for the start of all entries, and one to continue an existing entry. The trace_entry structure now has a "field" entry that consists of the previous content of the trace_entry, and a "cont" entry that is just a string buffer the size of the "field" entry. Thanks to Andrew Morton for suggesting this idea. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index f69f86788c2b..6ddd6a6556cf 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -61,13 +61,12 @@ struct stack_entry {
61}; 61};
62 62
63/* 63/*
64 * The trace entry - the most basic unit of tracing. This is what 64 * The trace field - the most basic unit of tracing. This is what
65 * is printed in the end as a single line in the trace output, such as: 65 * is printed in the end as a single line in the trace output, such as:
66 * 66 *
67 * bash-15816 [01] 235.197585: idle_cpu <- irq_enter 67 * bash-15816 [01] 235.197585: idle_cpu <- irq_enter
68 */ 68 */
69struct trace_entry { 69struct trace_field {
70 char type;
71 char cpu; 70 char cpu;
72 char flags; 71 char flags;
73 char preempt_count; 72 char preempt_count;
@@ -83,6 +82,18 @@ struct trace_entry {
83 }; 82 };
84}; 83};
85 84
85struct trace_field_cont {
86 char buf[sizeof(struct trace_field)];
87};
88
89struct trace_entry {
90 char type;
91 union {
92 struct trace_field field;
93 struct trace_field_cont cont;
94 };
95};
96
86#define TRACE_ENTRY_SIZE sizeof(struct trace_entry) 97#define TRACE_ENTRY_SIZE sizeof(struct trace_entry)
87 98
88/* 99/*