xref: /openbmc/linux/include/trace/events/context_tracking.h (revision 1b6a259aa5ab16d8b215bfc19ff7c9ffa8858f10)
1*1b6a259aSFrederic Weisbecker #undef TRACE_SYSTEM
2*1b6a259aSFrederic Weisbecker #define TRACE_SYSTEM context_tracking
3*1b6a259aSFrederic Weisbecker 
4*1b6a259aSFrederic Weisbecker #if !defined(_TRACE_CONTEXT_TRACKING_H) || defined(TRACE_HEADER_MULTI_READ)
5*1b6a259aSFrederic Weisbecker #define _TRACE_CONTEXT_TRACKING_H
6*1b6a259aSFrederic Weisbecker 
7*1b6a259aSFrederic Weisbecker #include <linux/tracepoint.h>
8*1b6a259aSFrederic Weisbecker 
9*1b6a259aSFrederic Weisbecker DECLARE_EVENT_CLASS(context_tracking_user,
10*1b6a259aSFrederic Weisbecker 
11*1b6a259aSFrederic Weisbecker 	TP_PROTO(int dummy),
12*1b6a259aSFrederic Weisbecker 
13*1b6a259aSFrederic Weisbecker 	TP_ARGS(dummy),
14*1b6a259aSFrederic Weisbecker 
15*1b6a259aSFrederic Weisbecker 	TP_STRUCT__entry(
16*1b6a259aSFrederic Weisbecker 		__field( int,	dummy	)
17*1b6a259aSFrederic Weisbecker 	),
18*1b6a259aSFrederic Weisbecker 
19*1b6a259aSFrederic Weisbecker 	TP_fast_assign(
20*1b6a259aSFrederic Weisbecker 		__entry->dummy		= dummy;
21*1b6a259aSFrederic Weisbecker 	),
22*1b6a259aSFrederic Weisbecker 
23*1b6a259aSFrederic Weisbecker 	TP_printk("%s", "")
24*1b6a259aSFrederic Weisbecker );
25*1b6a259aSFrederic Weisbecker 
26*1b6a259aSFrederic Weisbecker /**
27*1b6a259aSFrederic Weisbecker  * user_enter - called when the kernel resumes to userspace
28*1b6a259aSFrederic Weisbecker  * @dummy:	dummy arg to make trace event macro happy
29*1b6a259aSFrederic Weisbecker  *
30*1b6a259aSFrederic Weisbecker  * This event occurs when the kernel resumes to userspace  after
31*1b6a259aSFrederic Weisbecker  * an exception or a syscall.
32*1b6a259aSFrederic Weisbecker  */
33*1b6a259aSFrederic Weisbecker DEFINE_EVENT(context_tracking_user, user_enter,
34*1b6a259aSFrederic Weisbecker 
35*1b6a259aSFrederic Weisbecker 	TP_PROTO(int dummy),
36*1b6a259aSFrederic Weisbecker 
37*1b6a259aSFrederic Weisbecker 	TP_ARGS(dummy)
38*1b6a259aSFrederic Weisbecker );
39*1b6a259aSFrederic Weisbecker 
40*1b6a259aSFrederic Weisbecker /**
41*1b6a259aSFrederic Weisbecker  * user_exit - called when userspace enters the kernel
42*1b6a259aSFrederic Weisbecker  * @dummy:	dummy arg to make trace event macro happy
43*1b6a259aSFrederic Weisbecker  *
44*1b6a259aSFrederic Weisbecker  * This event occurs when userspace enters the kernel through
45*1b6a259aSFrederic Weisbecker  * an exception or a syscall.
46*1b6a259aSFrederic Weisbecker  */
47*1b6a259aSFrederic Weisbecker DEFINE_EVENT(context_tracking_user, user_exit,
48*1b6a259aSFrederic Weisbecker 
49*1b6a259aSFrederic Weisbecker 	TP_PROTO(int dummy),
50*1b6a259aSFrederic Weisbecker 
51*1b6a259aSFrederic Weisbecker 	TP_ARGS(dummy)
52*1b6a259aSFrederic Weisbecker );
53*1b6a259aSFrederic Weisbecker 
54*1b6a259aSFrederic Weisbecker 
55*1b6a259aSFrederic Weisbecker #endif /*  _TRACE_CONTEXT_TRACKING_H */
56*1b6a259aSFrederic Weisbecker 
57*1b6a259aSFrederic Weisbecker /* This part must be outside protection */
58*1b6a259aSFrederic Weisbecker #include <trace/define_trace.h>
59