aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_events.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-02-24 14:15:08 -0500
committerSteven Rostedt <srostedt@redhat.com>2009-02-24 21:54:08 -0500
commit1473e4417c79f12d91ef91a469699bfa911f510f (patch)
tree07ae02d5383367ed883616646f885be71f7431dd /kernel/trace/trace_events.h
parentf3fe8e4a38fd19dbb3f8ffb1826aa840ae304a65 (diff)
tracing: make event directory structure
This patch adds the directory /debug/tracing/events/ that will contain all the registered trace points. # ls /debug/tracing/events/ sched_kthread_stop sched_process_fork sched_switch sched_kthread_stop_ret sched_process_free sched_wait_task sched_migrate_task sched_process_wait sched_wakeup sched_process_exit sched_signal_send sched_wakeup_new # ls /debug/tracing/events/sched_switch/ enable # cat /debug/tracing/events/sched_switch/enable 1 # cat /debug/tracing/set_event sched_switch Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/trace_events.h')
-rw-r--r--kernel/trace/trace_events.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/trace/trace_events.h b/kernel/trace/trace_events.h
index 39342f86db27..cb8455b3ac9a 100644
--- a/kernel/trace/trace_events.h
+++ b/kernel/trace/trace_events.h
@@ -1,11 +1,13 @@
1#ifndef _LINUX_KERNEL_TRACE_EVENTS_H 1#ifndef _LINUX_KERNEL_TRACE_EVENTS_H
2#define _LINUX_KERNEL_TRACE_EVENTS_H 2#define _LINUX_KERNEL_TRACE_EVENTS_H
3 3
4#include <linux/debugfs.h>
4#include <linux/ftrace.h> 5#include <linux/ftrace.h>
5#include "trace.h" 6#include "trace.h"
6 7
7struct ftrace_event_call { 8struct ftrace_event_call {
8 char *name; 9 char *name;
10 struct dentry *dir;
9 int enabled; 11 int enabled;
10 int (*regfunc)(void); 12 int (*regfunc)(void);
11 void (*unregfunc)(void); 13 void (*unregfunc)(void);
@@ -39,6 +41,7 @@ static void ftrace_unreg_event_##call(void) \
39} \ 41} \
40 \ 42 \
41static struct ftrace_event_call __used \ 43static struct ftrace_event_call __used \
44__attribute__((__aligned__(4))) \
42__attribute__((section("_ftrace_events"))) event_##call = { \ 45__attribute__((section("_ftrace_events"))) event_##call = { \
43 .name = #call, \ 46 .name = #call, \
44 .regfunc = ftrace_reg_event_##call, \ 47 .regfunc = ftrace_reg_event_##call, \
@@ -46,7 +49,7 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
46} 49}
47 50
48void event_trace_printk(unsigned long ip, const char *fmt, ...); 51void event_trace_printk(unsigned long ip, const char *fmt, ...);
49extern unsigned long __start_ftrace_events[]; 52extern struct ftrace_event_call __start_ftrace_events[];
50extern unsigned long __stop_ftrace_events[]; 53extern struct ftrace_event_call __stop_ftrace_events[];
51 54
52#endif /* _LINUX_KERNEL_TRACE_EVENTS_H */ 55#endif /* _LINUX_KERNEL_TRACE_EVENTS_H */