0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #if !defined(_TRACE_CUSTOM_SCHED_H) || defined(TRACE_CUSTOM_MULTI_READ)
0011 #define _TRACE_CUSTOM_SCHED_H
0012
0013
0014 #include <linux/trace_events.h>
0015
0016
0017
0018
0019
0020
0021 TRACE_CUSTOM_EVENT(sched_switch,
0022
0023
0024
0025
0026
0027 TP_PROTO(bool preempt,
0028 struct task_struct *prev,
0029 struct task_struct *next,
0030 unsigned int prev_state),
0031
0032 TP_ARGS(preempt, prev, next, prev_state),
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042 TP_STRUCT__entry(
0043 __field( unsigned short, prev_prio )
0044 __field( unsigned short, next_prio )
0045 __field( pid_t, next_pid )
0046 ),
0047
0048 TP_fast_assign(
0049 __entry->prev_prio = prev->prio;
0050 __entry->next_pid = next->pid;
0051 __entry->next_prio = next->prio;
0052 ),
0053
0054 TP_printk("prev_prio=%d next_pid=%d next_prio=%d",
0055 __entry->prev_prio, __entry->next_pid, __entry->next_prio)
0056 )
0057
0058
0059 TRACE_CUSTOM_EVENT(sched_waking,
0060
0061 TP_PROTO(struct task_struct *p),
0062
0063 TP_ARGS(p),
0064
0065 TP_STRUCT__entry(
0066 __field( pid_t, pid )
0067 __field( unsigned short, prio )
0068 ),
0069
0070 TP_fast_assign(
0071 __entry->pid = p->pid;
0072 __entry->prio = p->prio;
0073 ),
0074
0075 TP_printk("pid=%d prio=%d", __entry->pid, __entry->prio)
0076 )
0077 #endif
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087 #undef TRACE_INCLUDE_PATH
0088 #undef TRACE_INCLUDE_FILE
0089 #define TRACE_INCLUDE_PATH .
0090
0091
0092
0093
0094
0095 #define TRACE_INCLUDE_FILE trace_custom_sched
0096 #include <trace/define_custom_trace.h>