1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 22b022e3dSXiao Guangrong #undef TRACE_SYSTEM 32b022e3dSXiao Guangrong #define TRACE_SYSTEM timer 42b022e3dSXiao Guangrong 52b022e3dSXiao Guangrong #if !defined(_TRACE_TIMER_H) || defined(TRACE_HEADER_MULTI_READ) 62b022e3dSXiao Guangrong #define _TRACE_TIMER_H 72b022e3dSXiao Guangrong 82b022e3dSXiao Guangrong #include <linux/tracepoint.h> 9c6a2a177SXiao Guangrong #include <linux/hrtimer.h> 102b022e3dSXiao Guangrong #include <linux/timer.h> 112b022e3dSXiao Guangrong 12363d0f64SLi Zefan DECLARE_EVENT_CLASS(timer_class, 132b022e3dSXiao Guangrong 142b022e3dSXiao Guangrong TP_PROTO(struct timer_list *timer), 152b022e3dSXiao Guangrong 162b022e3dSXiao Guangrong TP_ARGS(timer), 172b022e3dSXiao Guangrong 182b022e3dSXiao Guangrong TP_STRUCT__entry( 192b022e3dSXiao Guangrong __field( void *, timer ) 202b022e3dSXiao Guangrong ), 212b022e3dSXiao Guangrong 222b022e3dSXiao Guangrong TP_fast_assign( 232b022e3dSXiao Guangrong __entry->timer = timer; 242b022e3dSXiao Guangrong ), 252b022e3dSXiao Guangrong 26434a83c3SIngo Molnar TP_printk("timer=%p", __entry->timer) 272b022e3dSXiao Guangrong ); 282b022e3dSXiao Guangrong 292b022e3dSXiao Guangrong /** 30363d0f64SLi Zefan * timer_init - called when the timer is initialized 31363d0f64SLi Zefan * @timer: pointer to struct timer_list 32363d0f64SLi Zefan */ 33363d0f64SLi Zefan DEFINE_EVENT(timer_class, timer_init, 34363d0f64SLi Zefan 35363d0f64SLi Zefan TP_PROTO(struct timer_list *timer), 36363d0f64SLi Zefan 37363d0f64SLi Zefan TP_ARGS(timer) 38363d0f64SLi Zefan ); 39363d0f64SLi Zefan 408a58a34bSThomas Gleixner #define decode_timer_flags(flags) \ 418a58a34bSThomas Gleixner __print_flags(flags, "|", \ 428a58a34bSThomas Gleixner { TIMER_MIGRATING, "M" }, \ 438a58a34bSThomas Gleixner { TIMER_DEFERRABLE, "D" }, \ 448a58a34bSThomas Gleixner { TIMER_PINNED, "P" }, \ 458a58a34bSThomas Gleixner { TIMER_IRQSAFE, "I" }) 468a58a34bSThomas Gleixner 47363d0f64SLi Zefan /** 482b022e3dSXiao Guangrong * timer_start - called when the timer is started 492b022e3dSXiao Guangrong * @timer: pointer to struct timer_list 502b022e3dSXiao Guangrong * @expires: the timers expiry time 512b022e3dSXiao Guangrong */ 522b022e3dSXiao Guangrong TRACE_EVENT(timer_start, 532b022e3dSXiao Guangrong 544e413e85SBadhri Jagan Sridharan TP_PROTO(struct timer_list *timer, 554e413e85SBadhri Jagan Sridharan unsigned long expires, 560eeda71bSThomas Gleixner unsigned int flags), 572b022e3dSXiao Guangrong 580eeda71bSThomas Gleixner TP_ARGS(timer, expires, flags), 592b022e3dSXiao Guangrong 602b022e3dSXiao Guangrong TP_STRUCT__entry( 612b022e3dSXiao Guangrong __field( void *, timer ) 622b022e3dSXiao Guangrong __field( void *, function ) 632b022e3dSXiao Guangrong __field( unsigned long, expires ) 642b022e3dSXiao Guangrong __field( unsigned long, now ) 650eeda71bSThomas Gleixner __field( unsigned int, flags ) 662b022e3dSXiao Guangrong ), 672b022e3dSXiao Guangrong 682b022e3dSXiao Guangrong TP_fast_assign( 692b022e3dSXiao Guangrong __entry->timer = timer; 702b022e3dSXiao Guangrong __entry->function = timer->function; 712b022e3dSXiao Guangrong __entry->expires = expires; 722b022e3dSXiao Guangrong __entry->now = jiffies; 730eeda71bSThomas Gleixner __entry->flags = flags; 742b022e3dSXiao Guangrong ), 752b022e3dSXiao Guangrong 768a58a34bSThomas Gleixner TP_printk("timer=%p function=%pf expires=%lu [timeout=%ld] cpu=%u idx=%u flags=%s", 772b022e3dSXiao Guangrong __entry->timer, __entry->function, __entry->expires, 788a58a34bSThomas Gleixner (long)__entry->expires - __entry->now, 798a58a34bSThomas Gleixner __entry->flags & TIMER_CPUMASK, 808a58a34bSThomas Gleixner __entry->flags >> TIMER_ARRAYSHIFT, 818a58a34bSThomas Gleixner decode_timer_flags(__entry->flags & TIMER_TRACE_FLAGMASK)) 822b022e3dSXiao Guangrong ); 832b022e3dSXiao Guangrong 842b022e3dSXiao Guangrong /** 852b022e3dSXiao Guangrong * timer_expire_entry - called immediately before the timer callback 862b022e3dSXiao Guangrong * @timer: pointer to struct timer_list 872b022e3dSXiao Guangrong * 882b022e3dSXiao Guangrong * Allows to determine the timer latency. 892b022e3dSXiao Guangrong */ 902b022e3dSXiao Guangrong TRACE_EVENT(timer_expire_entry, 912b022e3dSXiao Guangrong 922b022e3dSXiao Guangrong TP_PROTO(struct timer_list *timer), 932b022e3dSXiao Guangrong 942b022e3dSXiao Guangrong TP_ARGS(timer), 952b022e3dSXiao Guangrong 962b022e3dSXiao Guangrong TP_STRUCT__entry( 972b022e3dSXiao Guangrong __field( void *, timer ) 982b022e3dSXiao Guangrong __field( unsigned long, now ) 99ede1b429SArjan van de Ven __field( void *, function) 1002b022e3dSXiao Guangrong ), 1012b022e3dSXiao Guangrong 1022b022e3dSXiao Guangrong TP_fast_assign( 1032b022e3dSXiao Guangrong __entry->timer = timer; 1042b022e3dSXiao Guangrong __entry->now = jiffies; 105ede1b429SArjan van de Ven __entry->function = timer->function; 1062b022e3dSXiao Guangrong ), 1072b022e3dSXiao Guangrong 108ede1b429SArjan van de Ven TP_printk("timer=%p function=%pf now=%lu", __entry->timer, __entry->function,__entry->now) 1092b022e3dSXiao Guangrong ); 1102b022e3dSXiao Guangrong 1112b022e3dSXiao Guangrong /** 1122b022e3dSXiao Guangrong * timer_expire_exit - called immediately after the timer callback returns 1132b022e3dSXiao Guangrong * @timer: pointer to struct timer_list 1142b022e3dSXiao Guangrong * 1152b022e3dSXiao Guangrong * When used in combination with the timer_expire_entry tracepoint we can 1162b022e3dSXiao Guangrong * determine the runtime of the timer callback function. 1172b022e3dSXiao Guangrong * 1182b022e3dSXiao Guangrong * NOTE: Do NOT derefernce timer in TP_fast_assign. The pointer might 1192b022e3dSXiao Guangrong * be invalid. We solely track the pointer. 1202b022e3dSXiao Guangrong */ 121363d0f64SLi Zefan DEFINE_EVENT(timer_class, timer_expire_exit, 1222b022e3dSXiao Guangrong 1232b022e3dSXiao Guangrong TP_PROTO(struct timer_list *timer), 1242b022e3dSXiao Guangrong 125363d0f64SLi Zefan TP_ARGS(timer) 1262b022e3dSXiao Guangrong ); 1272b022e3dSXiao Guangrong 1282b022e3dSXiao Guangrong /** 1292b022e3dSXiao Guangrong * timer_cancel - called when the timer is canceled 1302b022e3dSXiao Guangrong * @timer: pointer to struct timer_list 1312b022e3dSXiao Guangrong */ 132363d0f64SLi Zefan DEFINE_EVENT(timer_class, timer_cancel, 1332b022e3dSXiao Guangrong 1342b022e3dSXiao Guangrong TP_PROTO(struct timer_list *timer), 1352b022e3dSXiao Guangrong 136363d0f64SLi Zefan TP_ARGS(timer) 1372b022e3dSXiao Guangrong ); 1382b022e3dSXiao Guangrong 139c6a2a177SXiao Guangrong /** 140c6a2a177SXiao Guangrong * hrtimer_init - called when the hrtimer is initialized 141cf2fbdd2SMasanari Iida * @hrtimer: pointer to struct hrtimer 142c6a2a177SXiao Guangrong * @clockid: the hrtimers clock 143c6a2a177SXiao Guangrong * @mode: the hrtimers mode 144c6a2a177SXiao Guangrong */ 145c6a2a177SXiao Guangrong TRACE_EVENT(hrtimer_init, 146c6a2a177SXiao Guangrong 147434a83c3SIngo Molnar TP_PROTO(struct hrtimer *hrtimer, clockid_t clockid, 148c6a2a177SXiao Guangrong enum hrtimer_mode mode), 149c6a2a177SXiao Guangrong 150434a83c3SIngo Molnar TP_ARGS(hrtimer, clockid, mode), 151c6a2a177SXiao Guangrong 152c6a2a177SXiao Guangrong TP_STRUCT__entry( 153434a83c3SIngo Molnar __field( void *, hrtimer ) 154c6a2a177SXiao Guangrong __field( clockid_t, clockid ) 155c6a2a177SXiao Guangrong __field( enum hrtimer_mode, mode ) 156c6a2a177SXiao Guangrong ), 157c6a2a177SXiao Guangrong 158c6a2a177SXiao Guangrong TP_fast_assign( 159434a83c3SIngo Molnar __entry->hrtimer = hrtimer; 160c6a2a177SXiao Guangrong __entry->clockid = clockid; 161c6a2a177SXiao Guangrong __entry->mode = mode; 162c6a2a177SXiao Guangrong ), 163c6a2a177SXiao Guangrong 164434a83c3SIngo Molnar TP_printk("hrtimer=%p clockid=%s mode=%s", __entry->hrtimer, 165c6a2a177SXiao Guangrong __entry->clockid == CLOCK_REALTIME ? 166c6a2a177SXiao Guangrong "CLOCK_REALTIME" : "CLOCK_MONOTONIC", 167c6a2a177SXiao Guangrong __entry->mode == HRTIMER_MODE_ABS ? 168c6a2a177SXiao Guangrong "HRTIMER_MODE_ABS" : "HRTIMER_MODE_REL") 169c6a2a177SXiao Guangrong ); 170c6a2a177SXiao Guangrong 171c6a2a177SXiao Guangrong /** 172c6a2a177SXiao Guangrong * hrtimer_start - called when the hrtimer is started 173cf2fbdd2SMasanari Iida * @hrtimer: pointer to struct hrtimer 174c6a2a177SXiao Guangrong */ 175c6a2a177SXiao Guangrong TRACE_EVENT(hrtimer_start, 176c6a2a177SXiao Guangrong 177434a83c3SIngo Molnar TP_PROTO(struct hrtimer *hrtimer), 178c6a2a177SXiao Guangrong 179434a83c3SIngo Molnar TP_ARGS(hrtimer), 180c6a2a177SXiao Guangrong 181c6a2a177SXiao Guangrong TP_STRUCT__entry( 182434a83c3SIngo Molnar __field( void *, hrtimer ) 183c6a2a177SXiao Guangrong __field( void *, function ) 184c6a2a177SXiao Guangrong __field( s64, expires ) 185c6a2a177SXiao Guangrong __field( s64, softexpires ) 186c6a2a177SXiao Guangrong ), 187c6a2a177SXiao Guangrong 188c6a2a177SXiao Guangrong TP_fast_assign( 189434a83c3SIngo Molnar __entry->hrtimer = hrtimer; 190434a83c3SIngo Molnar __entry->function = hrtimer->function; 1912456e855SThomas Gleixner __entry->expires = hrtimer_get_expires(hrtimer); 1922456e855SThomas Gleixner __entry->softexpires = hrtimer_get_softexpires(hrtimer); 193c6a2a177SXiao Guangrong ), 194c6a2a177SXiao Guangrong 195434a83c3SIngo Molnar TP_printk("hrtimer=%p function=%pf expires=%llu softexpires=%llu", 196434a83c3SIngo Molnar __entry->hrtimer, __entry->function, 1972456e855SThomas Gleixner (unsigned long long) __entry->expires, 1982456e855SThomas Gleixner (unsigned long long) __entry->softexpires) 199c6a2a177SXiao Guangrong ); 200c6a2a177SXiao Guangrong 201c6a2a177SXiao Guangrong /** 202cf2fbdd2SMasanari Iida * hrtimer_expire_entry - called immediately before the hrtimer callback 203cf2fbdd2SMasanari Iida * @hrtimer: pointer to struct hrtimer 204c6a2a177SXiao Guangrong * @now: pointer to variable which contains current time of the 205c6a2a177SXiao Guangrong * timers base. 206c6a2a177SXiao Guangrong * 207c6a2a177SXiao Guangrong * Allows to determine the timer latency. 208c6a2a177SXiao Guangrong */ 209c6a2a177SXiao Guangrong TRACE_EVENT(hrtimer_expire_entry, 210c6a2a177SXiao Guangrong 211434a83c3SIngo Molnar TP_PROTO(struct hrtimer *hrtimer, ktime_t *now), 212c6a2a177SXiao Guangrong 213434a83c3SIngo Molnar TP_ARGS(hrtimer, now), 214c6a2a177SXiao Guangrong 215c6a2a177SXiao Guangrong TP_STRUCT__entry( 216434a83c3SIngo Molnar __field( void *, hrtimer ) 217c6a2a177SXiao Guangrong __field( s64, now ) 218ede1b429SArjan van de Ven __field( void *, function) 219c6a2a177SXiao Guangrong ), 220c6a2a177SXiao Guangrong 221c6a2a177SXiao Guangrong TP_fast_assign( 222434a83c3SIngo Molnar __entry->hrtimer = hrtimer; 2232456e855SThomas Gleixner __entry->now = *now; 224ede1b429SArjan van de Ven __entry->function = hrtimer->function; 225c6a2a177SXiao Guangrong ), 226c6a2a177SXiao Guangrong 227ede1b429SArjan van de Ven TP_printk("hrtimer=%p function=%pf now=%llu", __entry->hrtimer, __entry->function, 2282456e855SThomas Gleixner (unsigned long long) __entry->now) 229c6a2a177SXiao Guangrong ); 230c6a2a177SXiao Guangrong 231363d0f64SLi Zefan DECLARE_EVENT_CLASS(hrtimer_class, 232c6a2a177SXiao Guangrong 233434a83c3SIngo Molnar TP_PROTO(struct hrtimer *hrtimer), 234c6a2a177SXiao Guangrong 235434a83c3SIngo Molnar TP_ARGS(hrtimer), 236c6a2a177SXiao Guangrong 237c6a2a177SXiao Guangrong TP_STRUCT__entry( 238434a83c3SIngo Molnar __field( void *, hrtimer ) 239c6a2a177SXiao Guangrong ), 240c6a2a177SXiao Guangrong 241c6a2a177SXiao Guangrong TP_fast_assign( 242434a83c3SIngo Molnar __entry->hrtimer = hrtimer; 243c6a2a177SXiao Guangrong ), 244c6a2a177SXiao Guangrong 245434a83c3SIngo Molnar TP_printk("hrtimer=%p", __entry->hrtimer) 246c6a2a177SXiao Guangrong ); 247c6a2a177SXiao Guangrong 248c6a2a177SXiao Guangrong /** 249363d0f64SLi Zefan * hrtimer_expire_exit - called immediately after the hrtimer callback returns 250cf2fbdd2SMasanari Iida * @hrtimer: pointer to struct hrtimer 251363d0f64SLi Zefan * 252363d0f64SLi Zefan * When used in combination with the hrtimer_expire_entry tracepoint we can 253363d0f64SLi Zefan * determine the runtime of the callback function. 254c6a2a177SXiao Guangrong */ 255363d0f64SLi Zefan DEFINE_EVENT(hrtimer_class, hrtimer_expire_exit, 256c6a2a177SXiao Guangrong 257434a83c3SIngo Molnar TP_PROTO(struct hrtimer *hrtimer), 258c6a2a177SXiao Guangrong 259363d0f64SLi Zefan TP_ARGS(hrtimer) 260363d0f64SLi Zefan ); 261c6a2a177SXiao Guangrong 262363d0f64SLi Zefan /** 263363d0f64SLi Zefan * hrtimer_cancel - called when the hrtimer is canceled 264363d0f64SLi Zefan * @hrtimer: pointer to struct hrtimer 265363d0f64SLi Zefan */ 266363d0f64SLi Zefan DEFINE_EVENT(hrtimer_class, hrtimer_cancel, 267c6a2a177SXiao Guangrong 268363d0f64SLi Zefan TP_PROTO(struct hrtimer *hrtimer), 269c6a2a177SXiao Guangrong 270363d0f64SLi Zefan TP_ARGS(hrtimer) 271c6a2a177SXiao Guangrong ); 272c6a2a177SXiao Guangrong 2733f0a525eSXiao Guangrong /** 2743f0a525eSXiao Guangrong * itimer_state - called when itimer is started or canceled 2753f0a525eSXiao Guangrong * @which: name of the interval timer 2763f0a525eSXiao Guangrong * @value: the itimers value, itimer is canceled if value->it_value is 2773f0a525eSXiao Guangrong * zero, otherwise it is started 2783f0a525eSXiao Guangrong * @expires: the itimers expiry time 2793f0a525eSXiao Guangrong */ 2803f0a525eSXiao Guangrong TRACE_EVENT(itimer_state, 2813f0a525eSXiao Guangrong 2823f0a525eSXiao Guangrong TP_PROTO(int which, const struct itimerval *const value, 283858cf3a8SFrederic Weisbecker unsigned long long expires), 2843f0a525eSXiao Guangrong 2853f0a525eSXiao Guangrong TP_ARGS(which, value, expires), 2863f0a525eSXiao Guangrong 2873f0a525eSXiao Guangrong TP_STRUCT__entry( 2883f0a525eSXiao Guangrong __field( int, which ) 289858cf3a8SFrederic Weisbecker __field( unsigned long long, expires ) 2903f0a525eSXiao Guangrong __field( long, value_sec ) 2913f0a525eSXiao Guangrong __field( long, value_usec ) 2923f0a525eSXiao Guangrong __field( long, interval_sec ) 2933f0a525eSXiao Guangrong __field( long, interval_usec ) 2943f0a525eSXiao Guangrong ), 2953f0a525eSXiao Guangrong 2963f0a525eSXiao Guangrong TP_fast_assign( 2973f0a525eSXiao Guangrong __entry->which = which; 2983f0a525eSXiao Guangrong __entry->expires = expires; 2993f0a525eSXiao Guangrong __entry->value_sec = value->it_value.tv_sec; 3003f0a525eSXiao Guangrong __entry->value_usec = value->it_value.tv_usec; 3013f0a525eSXiao Guangrong __entry->interval_sec = value->it_interval.tv_sec; 3023f0a525eSXiao Guangrong __entry->interval_usec = value->it_interval.tv_usec; 3033f0a525eSXiao Guangrong ), 3043f0a525eSXiao Guangrong 305e9c0748bSThomas Gleixner TP_printk("which=%d expires=%llu it_value=%ld.%ld it_interval=%ld.%ld", 306858cf3a8SFrederic Weisbecker __entry->which, __entry->expires, 3073f0a525eSXiao Guangrong __entry->value_sec, __entry->value_usec, 3083f0a525eSXiao Guangrong __entry->interval_sec, __entry->interval_usec) 3093f0a525eSXiao Guangrong ); 3103f0a525eSXiao Guangrong 3113f0a525eSXiao Guangrong /** 3123f0a525eSXiao Guangrong * itimer_expire - called when itimer expires 3133f0a525eSXiao Guangrong * @which: type of the interval timer 3143f0a525eSXiao Guangrong * @pid: pid of the process which owns the timer 3153f0a525eSXiao Guangrong * @now: current time, used to calculate the latency of itimer 3163f0a525eSXiao Guangrong */ 3173f0a525eSXiao Guangrong TRACE_EVENT(itimer_expire, 3183f0a525eSXiao Guangrong 319858cf3a8SFrederic Weisbecker TP_PROTO(int which, struct pid *pid, unsigned long long now), 3203f0a525eSXiao Guangrong 3213f0a525eSXiao Guangrong TP_ARGS(which, pid, now), 3223f0a525eSXiao Guangrong 3233f0a525eSXiao Guangrong TP_STRUCT__entry( 3243f0a525eSXiao Guangrong __field( int , which ) 3253f0a525eSXiao Guangrong __field( pid_t, pid ) 326858cf3a8SFrederic Weisbecker __field( unsigned long long, now ) 3273f0a525eSXiao Guangrong ), 3283f0a525eSXiao Guangrong 3293f0a525eSXiao Guangrong TP_fast_assign( 3303f0a525eSXiao Guangrong __entry->which = which; 3313f0a525eSXiao Guangrong __entry->now = now; 3323f0a525eSXiao Guangrong __entry->pid = pid_nr(pid); 3333f0a525eSXiao Guangrong ), 3343f0a525eSXiao Guangrong 335e9c0748bSThomas Gleixner TP_printk("which=%d pid=%d now=%llu", __entry->which, 336858cf3a8SFrederic Weisbecker (int) __entry->pid, __entry->now) 3373f0a525eSXiao Guangrong ); 3383f0a525eSXiao Guangrong 3392c82d1beSFrederic Weisbecker #ifdef CONFIG_NO_HZ_COMMON 340e6e6cc22SFrederic Weisbecker 341e6e6cc22SFrederic Weisbecker #define TICK_DEP_NAMES \ 342c87edb36SSteven Rostedt (Red Hat) tick_dep_mask_name(NONE) \ 343e6e6cc22SFrederic Weisbecker tick_dep_name(POSIX_TIMER) \ 344e6e6cc22SFrederic Weisbecker tick_dep_name(PERF_EVENTS) \ 345e6e6cc22SFrederic Weisbecker tick_dep_name(SCHED) \ 346e6e6cc22SFrederic Weisbecker tick_dep_name_end(CLOCK_UNSTABLE) 347e6e6cc22SFrederic Weisbecker 348e6e6cc22SFrederic Weisbecker #undef tick_dep_name 349c87edb36SSteven Rostedt (Red Hat) #undef tick_dep_mask_name 350e6e6cc22SFrederic Weisbecker #undef tick_dep_name_end 351e6e6cc22SFrederic Weisbecker 352c87edb36SSteven Rostedt (Red Hat) /* The MASK will convert to their bits and they need to be processed too */ 353c87edb36SSteven Rostedt (Red Hat) #define tick_dep_name(sdep) TRACE_DEFINE_ENUM(TICK_DEP_BIT_##sdep); \ 354c87edb36SSteven Rostedt (Red Hat) TRACE_DEFINE_ENUM(TICK_DEP_MASK_##sdep); 355c87edb36SSteven Rostedt (Red Hat) #define tick_dep_name_end(sdep) TRACE_DEFINE_ENUM(TICK_DEP_BIT_##sdep); \ 356c87edb36SSteven Rostedt (Red Hat) TRACE_DEFINE_ENUM(TICK_DEP_MASK_##sdep); 357c87edb36SSteven Rostedt (Red Hat) /* NONE only has a mask defined for it */ 358c87edb36SSteven Rostedt (Red Hat) #define tick_dep_mask_name(sdep) TRACE_DEFINE_ENUM(TICK_DEP_MASK_##sdep); 359e6e6cc22SFrederic Weisbecker 360e6e6cc22SFrederic Weisbecker TICK_DEP_NAMES 361e6e6cc22SFrederic Weisbecker 362e6e6cc22SFrederic Weisbecker #undef tick_dep_name 363c87edb36SSteven Rostedt (Red Hat) #undef tick_dep_mask_name 364e6e6cc22SFrederic Weisbecker #undef tick_dep_name_end 365e6e6cc22SFrederic Weisbecker 366e6e6cc22SFrederic Weisbecker #define tick_dep_name(sdep) { TICK_DEP_MASK_##sdep, #sdep }, 367c87edb36SSteven Rostedt (Red Hat) #define tick_dep_mask_name(sdep) { TICK_DEP_MASK_##sdep, #sdep }, 368e6e6cc22SFrederic Weisbecker #define tick_dep_name_end(sdep) { TICK_DEP_MASK_##sdep, #sdep } 369e6e6cc22SFrederic Weisbecker 370e6e6cc22SFrederic Weisbecker #define show_tick_dep_name(val) \ 371e6e6cc22SFrederic Weisbecker __print_symbolic(val, TICK_DEP_NAMES) 372e6e6cc22SFrederic Weisbecker 373cb41a290SFrederic Weisbecker TRACE_EVENT(tick_stop, 374cb41a290SFrederic Weisbecker 375e6e6cc22SFrederic Weisbecker TP_PROTO(int success, int dependency), 376cb41a290SFrederic Weisbecker 377e6e6cc22SFrederic Weisbecker TP_ARGS(success, dependency), 378cb41a290SFrederic Weisbecker 379cb41a290SFrederic Weisbecker TP_STRUCT__entry( 380cb41a290SFrederic Weisbecker __field( int , success ) 381e6e6cc22SFrederic Weisbecker __field( int , dependency ) 382cb41a290SFrederic Weisbecker ), 383cb41a290SFrederic Weisbecker 384cb41a290SFrederic Weisbecker TP_fast_assign( 385cb41a290SFrederic Weisbecker __entry->success = success; 386e6e6cc22SFrederic Weisbecker __entry->dependency = dependency; 387cb41a290SFrederic Weisbecker ), 388cb41a290SFrederic Weisbecker 389e6e6cc22SFrederic Weisbecker TP_printk("success=%d dependency=%s", __entry->success, \ 390e6e6cc22SFrederic Weisbecker show_tick_dep_name(__entry->dependency)) 391cb41a290SFrederic Weisbecker ); 392cb41a290SFrederic Weisbecker #endif 393cb41a290SFrederic Weisbecker 3942b022e3dSXiao Guangrong #endif /* _TRACE_TIMER_H */ 3952b022e3dSXiao Guangrong 3962b022e3dSXiao Guangrong /* This part must be outside protection */ 3972b022e3dSXiao Guangrong #include <trace/define_trace.h> 398