1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 21b6a259aSFrederic Weisbecker #undef TRACE_SYSTEM 31b6a259aSFrederic Weisbecker #define TRACE_SYSTEM context_tracking 41b6a259aSFrederic Weisbecker 51b6a259aSFrederic Weisbecker #if !defined(_TRACE_CONTEXT_TRACKING_H) || defined(TRACE_HEADER_MULTI_READ) 61b6a259aSFrederic Weisbecker #define _TRACE_CONTEXT_TRACKING_H 71b6a259aSFrederic Weisbecker 81b6a259aSFrederic Weisbecker #include <linux/tracepoint.h> 91b6a259aSFrederic Weisbecker 101b6a259aSFrederic Weisbecker DECLARE_EVENT_CLASS(context_tracking_user, 111b6a259aSFrederic Weisbecker 121b6a259aSFrederic Weisbecker TP_PROTO(int dummy), 131b6a259aSFrederic Weisbecker 141b6a259aSFrederic Weisbecker TP_ARGS(dummy), 151b6a259aSFrederic Weisbecker 161b6a259aSFrederic Weisbecker TP_STRUCT__entry( 171b6a259aSFrederic Weisbecker __field( int, dummy ) 181b6a259aSFrederic Weisbecker ), 191b6a259aSFrederic Weisbecker 201b6a259aSFrederic Weisbecker TP_fast_assign( 211b6a259aSFrederic Weisbecker __entry->dummy = dummy; 221b6a259aSFrederic Weisbecker ), 231b6a259aSFrederic Weisbecker 241b6a259aSFrederic Weisbecker TP_printk("%s", "") 251b6a259aSFrederic Weisbecker ); 261b6a259aSFrederic Weisbecker 271b6a259aSFrederic Weisbecker /** 281b6a259aSFrederic Weisbecker * user_enter - called when the kernel resumes to userspace 291b6a259aSFrederic Weisbecker * @dummy: dummy arg to make trace event macro happy 301b6a259aSFrederic Weisbecker * 311b6a259aSFrederic Weisbecker * This event occurs when the kernel resumes to userspace after 321b6a259aSFrederic Weisbecker * an exception or a syscall. 331b6a259aSFrederic Weisbecker */ 341b6a259aSFrederic Weisbecker DEFINE_EVENT(context_tracking_user, user_enter, 351b6a259aSFrederic Weisbecker 361b6a259aSFrederic Weisbecker TP_PROTO(int dummy), 371b6a259aSFrederic Weisbecker 381b6a259aSFrederic Weisbecker TP_ARGS(dummy) 391b6a259aSFrederic Weisbecker ); 401b6a259aSFrederic Weisbecker 411b6a259aSFrederic Weisbecker /** 421b6a259aSFrederic Weisbecker * user_exit - called when userspace enters the kernel 431b6a259aSFrederic Weisbecker * @dummy: dummy arg to make trace event macro happy 441b6a259aSFrederic Weisbecker * 451b6a259aSFrederic Weisbecker * This event occurs when userspace enters the kernel through 461b6a259aSFrederic Weisbecker * an exception or a syscall. 471b6a259aSFrederic Weisbecker */ 481b6a259aSFrederic Weisbecker DEFINE_EVENT(context_tracking_user, user_exit, 491b6a259aSFrederic Weisbecker 501b6a259aSFrederic Weisbecker TP_PROTO(int dummy), 511b6a259aSFrederic Weisbecker 521b6a259aSFrederic Weisbecker TP_ARGS(dummy) 531b6a259aSFrederic Weisbecker ); 541b6a259aSFrederic Weisbecker 551b6a259aSFrederic Weisbecker 561b6a259aSFrederic Weisbecker #endif /* _TRACE_CONTEXT_TRACKING_H */ 571b6a259aSFrederic Weisbecker 581b6a259aSFrederic Weisbecker /* This part must be outside protection */ 591b6a259aSFrederic Weisbecker #include <trace/define_trace.h> 60