1949fa3f1SLeonardo Bras /* SPDX-License-Identifier: GPL-2.0 */ 2949fa3f1SLeonardo Bras #undef TRACE_SYSTEM 3949fa3f1SLeonardo Bras #define TRACE_SYSTEM csd 4949fa3f1SLeonardo Bras 5949fa3f1SLeonardo Bras #if !defined(_TRACE_CSD_H) || defined(TRACE_HEADER_MULTI_READ) 6949fa3f1SLeonardo Bras #define _TRACE_CSD_H 7949fa3f1SLeonardo Bras 8949fa3f1SLeonardo Bras #include <linux/tracepoint.h> 9949fa3f1SLeonardo Bras 10*bf5a8c26SLeonardo Bras TRACE_EVENT(csd_queue_cpu, 11*bf5a8c26SLeonardo Bras 12*bf5a8c26SLeonardo Bras TP_PROTO(const unsigned int cpu, 13*bf5a8c26SLeonardo Bras unsigned long callsite, 14*bf5a8c26SLeonardo Bras smp_call_func_t func, 15*bf5a8c26SLeonardo Bras struct __call_single_data *csd), 16*bf5a8c26SLeonardo Bras 17*bf5a8c26SLeonardo Bras TP_ARGS(cpu, callsite, func, csd), 18*bf5a8c26SLeonardo Bras 19*bf5a8c26SLeonardo Bras TP_STRUCT__entry( 20*bf5a8c26SLeonardo Bras __field(unsigned int, cpu) 21*bf5a8c26SLeonardo Bras __field(void *, callsite) 22*bf5a8c26SLeonardo Bras __field(void *, func) 23*bf5a8c26SLeonardo Bras __field(void *, csd) 24*bf5a8c26SLeonardo Bras ), 25*bf5a8c26SLeonardo Bras 26*bf5a8c26SLeonardo Bras TP_fast_assign( 27*bf5a8c26SLeonardo Bras __entry->cpu = cpu; 28*bf5a8c26SLeonardo Bras __entry->callsite = (void *)callsite; 29*bf5a8c26SLeonardo Bras __entry->func = func; 30*bf5a8c26SLeonardo Bras __entry->csd = csd; 31*bf5a8c26SLeonardo Bras ), 32*bf5a8c26SLeonardo Bras 33*bf5a8c26SLeonardo Bras TP_printk("cpu=%u callsite=%pS func=%ps csd=%p", 34*bf5a8c26SLeonardo Bras __entry->cpu, __entry->callsite, __entry->func, __entry->csd) 35*bf5a8c26SLeonardo Bras ); 36*bf5a8c26SLeonardo Bras 37949fa3f1SLeonardo Bras /* 38949fa3f1SLeonardo Bras * Tracepoints for a function which is called as an effect of smp_call_function.* 39949fa3f1SLeonardo Bras */ 40949fa3f1SLeonardo Bras DECLARE_EVENT_CLASS(csd_function, 41949fa3f1SLeonardo Bras 42949fa3f1SLeonardo Bras TP_PROTO(smp_call_func_t func, struct __call_single_data *csd), 43949fa3f1SLeonardo Bras 44949fa3f1SLeonardo Bras TP_ARGS(func, csd), 45949fa3f1SLeonardo Bras 46949fa3f1SLeonardo Bras TP_STRUCT__entry( 47949fa3f1SLeonardo Bras __field(void *, func) 48949fa3f1SLeonardo Bras __field(void *, csd) 49949fa3f1SLeonardo Bras ), 50949fa3f1SLeonardo Bras 51949fa3f1SLeonardo Bras TP_fast_assign( 52949fa3f1SLeonardo Bras __entry->func = func; 53949fa3f1SLeonardo Bras __entry->csd = csd; 54949fa3f1SLeonardo Bras ), 55949fa3f1SLeonardo Bras 56949fa3f1SLeonardo Bras TP_printk("func=%ps, csd=%p", __entry->func, __entry->csd) 57949fa3f1SLeonardo Bras ); 58949fa3f1SLeonardo Bras 59949fa3f1SLeonardo Bras DEFINE_EVENT(csd_function, csd_function_entry, 60949fa3f1SLeonardo Bras TP_PROTO(smp_call_func_t func, struct __call_single_data *csd), 61949fa3f1SLeonardo Bras TP_ARGS(func, csd) 62949fa3f1SLeonardo Bras ); 63949fa3f1SLeonardo Bras 64949fa3f1SLeonardo Bras DEFINE_EVENT(csd_function, csd_function_exit, 65949fa3f1SLeonardo Bras TP_PROTO(smp_call_func_t func, struct __call_single_data *csd), 66949fa3f1SLeonardo Bras TP_ARGS(func, csd) 67949fa3f1SLeonardo Bras ); 68949fa3f1SLeonardo Bras 69949fa3f1SLeonardo Bras #endif /* _TRACE_CSD_H */ 70949fa3f1SLeonardo Bras 71949fa3f1SLeonardo Bras /* This part must be outside protection */ 72949fa3f1SLeonardo Bras #include <trace/define_trace.h> 73