aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-02-28 02:41:25 -0500
committerSteven Rostedt <srostedt@redhat.com>2009-02-28 04:04:03 -0500
commitfd99498989f3b3feeab89dcadf537138ba136d24 (patch)
tree9470e9b4e886466511d47a70281e77e5a8c674ff /kernel/trace/trace.h
parentc32e827b25054cb17b79cf97fb5e63ae4ce2223c (diff)
tracing: add raw fast tracing interface for trace events
This patch adds the interface to enable the C style trace points. In the directory /debugfs/tracing/events/subsystem/event We now have three files: enable : values 0 or 1 to enable or disable the trace event. available_types: values 'raw' and 'printf' which indicate the tracing types available for the trace point. If a developer does not use the TRACE_EVENT_FORMAT macro and just uses the TRACE_FORMAT macro, then only 'printf' will be available. This file is read only. type: values 'raw' or 'printf'. This indicates which type of tracing is active for that trace point. 'printf' is the default and if 'raw' is not available, this file is read only. # echo raw > /debug/tracing/events/sched/sched_wakeup/type # echo 1 > /debug/tracing/events/sched/sched_wakeup/enable Will enable the C style tracing for the sched_wakeup trace point. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index aa1ab0cb80ab..f6fa0b9f83a8 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -726,6 +726,12 @@ static inline void trace_branch_disable(void)
726} 726}
727#endif /* CONFIG_BRANCH_TRACER */ 727#endif /* CONFIG_BRANCH_TRACER */
728 728
729/* trace event type bit fields, not numeric */
730enum {
731 TRACE_EVENT_TYPE_PRINTF = 1,
732 TRACE_EVENT_TYPE_RAW = 2,
733};
734
729struct ftrace_event_call { 735struct ftrace_event_call {
730 char *name; 736 char *name;
731 char *system; 737 char *system;
@@ -736,6 +742,7 @@ struct ftrace_event_call {
736 int id; 742 int id;
737 struct dentry *raw_dir; 743 struct dentry *raw_dir;
738 int raw_enabled; 744 int raw_enabled;
745 int type;
739 int (*raw_init)(void); 746 int (*raw_init)(void);
740 int (*raw_reg)(void); 747 int (*raw_reg)(void);
741 void (*raw_unreg)(void); 748 void (*raw_unreg)(void);