Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #undef TRACE_SYSTEM
0003 #define TRACE_SYSTEM context_tracking
0004 
0005 #if !defined(_TRACE_CONTEXT_TRACKING_H) || defined(TRACE_HEADER_MULTI_READ)
0006 #define _TRACE_CONTEXT_TRACKING_H
0007 
0008 #include <linux/tracepoint.h>
0009 
0010 DECLARE_EVENT_CLASS(context_tracking_user,
0011 
0012     TP_PROTO(int dummy),
0013 
0014     TP_ARGS(dummy),
0015 
0016     TP_STRUCT__entry(
0017         __field( int,   dummy   )
0018     ),
0019 
0020     TP_fast_assign(
0021         __entry->dummy      = dummy;
0022     ),
0023 
0024     TP_printk("%s", "")
0025 );
0026 
0027 /**
0028  * user_enter - called when the kernel resumes to userspace
0029  * @dummy:  dummy arg to make trace event macro happy
0030  *
0031  * This event occurs when the kernel resumes to userspace  after
0032  * an exception or a syscall.
0033  */
0034 DEFINE_EVENT(context_tracking_user, user_enter,
0035 
0036     TP_PROTO(int dummy),
0037 
0038     TP_ARGS(dummy)
0039 );
0040 
0041 /**
0042  * user_exit - called when userspace enters the kernel
0043  * @dummy:  dummy arg to make trace event macro happy
0044  *
0045  * This event occurs when userspace enters the kernel through
0046  * an exception or a syscall.
0047  */
0048 DEFINE_EVENT(context_tracking_user, user_exit,
0049 
0050     TP_PROTO(int dummy),
0051 
0052     TP_ARGS(dummy)
0053 );
0054 
0055 
0056 #endif /*  _TRACE_CONTEXT_TRACKING_H */
0057 
0058 /* This part must be outside protection */
0059 #include <trace/define_trace.h>