0001
0002
0003
0004
0005
0006
0007
0008 #define pr_fmt(fmt) fmt
0009
0010 #include <linux/trace_events.h>
0011 #include <linux/version.h>
0012 #include <linux/module.h>
0013 #include <linux/sched.h>
0014
0015
0016
0017
0018
0019 #include <trace/events/sched.h>
0020
0021
0022 #define CREATE_CUSTOM_TRACE_EVENTS
0023
0024 #include "trace_custom_sched.h"
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039 static void fct(struct tracepoint *tp, void *priv)
0040 {
0041 trace_custom_event_sched_switch_update(tp);
0042 trace_custom_event_sched_waking_update(tp);
0043 }
0044
0045 static int __init trace_sched_init(void)
0046 {
0047 for_each_kernel_tracepoint(fct, NULL);
0048 return 0;
0049 }
0050
0051 static void __exit trace_sched_exit(void)
0052 {
0053 }
0054
0055 module_init(trace_sched_init);
0056 module_exit(trace_sched_exit);
0057
0058 MODULE_AUTHOR("Steven Rostedt");
0059 MODULE_DESCRIPTION("Custom scheduling events");
0060 MODULE_LICENSE("GPL");