aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-02 13:53:59 -0500
committerSteven Rostedt <srostedt@redhat.com>2009-03-02 14:27:27 -0500
commit981d081ec8b958b7d962ee40d433581a55d40fc5 (patch)
tree366aa5da7dc98cc2354002946e6f19ec60c02301 /kernel/trace/trace.h
parentf9520750c4c9924c14325cd951efae5fae58104c (diff)
downloadkernel_samsung_crespo-981d081ec8b958b7d962ee40d433581a55d40fc5.zip
kernel_samsung_crespo-981d081ec8b958b7d962ee40d433581a55d40fc5.tar.gz
kernel_samsung_crespo-981d081ec8b958b7d962ee40d433581a55d40fc5.tar.bz2
tracing: add format file to describe event struct fields
This patch adds the "format" file to the trace point event directory. This is based off of work by Tom Zanussi, in which a file is exported to be tread from user land such that a user space app may read the binary record stored in the ring buffer. # cat /debug/tracing/events/sched/sched_switch/format field:pid_t prev_pid; offset:12; size:4; field:int prev_prio; offset:16; size:4; field special:char next_comm[TASK_COMM_LEN]; offset:20; size:16; field:pid_t next_pid; offset:36; size:4; field:int next_prio; offset:40; size:4; Idea-from: Tom Zanussi <tzanussi@gmail.com> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index cf6ba41..e606633 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -754,6 +754,7 @@ struct ftrace_event_call {
int (*raw_init)(void);
int (*raw_reg)(void);
void (*raw_unreg)(void);
+ int (*show_format)(struct trace_seq *s);
};
void event_trace_printk(unsigned long ip, const char *fmt, ...);