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>
This commit is contained in:
Steven Rostedt
2008-08-01 12:26:40 -04:00
committed by Ingo Molnar
parent fed1939c64
commit 2e2ca155cd
3 changed files with 160 additions and 136 deletions

View File

@@ -61,13 +61,12 @@ struct stack_entry {
};
/*
* The trace entry - the most basic unit of tracing. This is what
* The trace field - the most basic unit of tracing. This is what
* is printed in the end as a single line in the trace output, such as:
*
* bash-15816 [01] 235.197585: idle_cpu <- irq_enter
*/
struct trace_entry {
char type;
struct trace_field {
char cpu;
char flags;
char preempt_count;
@@ -83,6 +82,18 @@ struct trace_entry {
};
};
struct trace_field_cont {
char buf[sizeof(struct trace_field)];
};
struct trace_entry {
char type;
union {
struct trace_field field;
struct trace_field_cont cont;
};
};
#define TRACE_ENTRY_SIZE sizeof(struct trace_entry)
/*