ftrace: inject markers via trace_marker file

Allow a user to inject a marker (TRACE_PRINT entry) into the trace ring
buffer. The related file operations are derived from code by Frédéric
Weisbecker <fweisbec@gmail.com>.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Pekka Paalanen
2008-09-16 22:06:42 +03:00
committed by Ingo Molnar
parent 4427414170
commit 5bf9a1ee35
3 changed files with 77 additions and 8 deletions

View File

@@ -124,6 +124,10 @@ struct trace_entry {
};
#define TRACE_ENTRY_SIZE sizeof(struct trace_entry)
#define TRACE_BUF_SIZE 1024
#define TRACE_PRINT_BUF_SIZE \
(sizeof(struct trace_field) - offsetof(struct trace_field, print.buf))
#define TRACE_CONT_BUF_SIZE sizeof(struct trace_field)
/*
* The CPU trace array - it consists of thousands of trace entries