xref: /linux/drivers/soc/qcom/trace_icc-bwmon.h (revision c060f8168bdf22aa986970955af99702d142dfbe)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
4  */
5 
6 #undef TRACE_SYSTEM
7 #define TRACE_SYSTEM icc_bwmon
8 
9 #if !defined(_TRACE_ICC_BWMON_H) || defined(TRACE_HEADER_MULTI_READ)
10 #define _TRACE_ICC_BWMON_H
11 #include <linux/tracepoint.h>
12 
13 TRACE_EVENT(qcom_bwmon_update,
14 	    TP_PROTO(const char *name,
15 		     unsigned int meas_kbps, unsigned int up_kbps, unsigned int down_kbps),
16 
17 	    TP_ARGS(name, meas_kbps, up_kbps, down_kbps),
18 
19 	    TP_STRUCT__entry(
20 			     __string(name, name)
21 			     __field(unsigned int, meas_kbps)
22 			     __field(unsigned int, up_kbps)
23 			     __field(unsigned int, down_kbps)
24 	    ),
25 
26 	    TP_fast_assign(
27 			   __assign_str(name);
28 			   __entry->meas_kbps = meas_kbps;
29 			   __entry->up_kbps = up_kbps;
30 			   __entry->down_kbps = down_kbps;
31 	    ),
32 
33 	    TP_printk("name=%s meas_kbps=%u up_kbps=%u down_kbps=%u",
34 		      __get_str(name),
35 		      __entry->meas_kbps,
36 		      __entry->up_kbps,
37 		      __entry->down_kbps)
38 );
39 
40 #endif /* _TRACE_ICC_BWMON_H */
41 
42 #undef TRACE_INCLUDE_PATH
43 #define TRACE_INCLUDE_PATH ../../drivers/soc/qcom/
44 
45 #undef TRACE_INCLUDE_FILE
46 #define TRACE_INCLUDE_FILE trace_icc-bwmon
47 
48 #include <trace/define_trace.h>
49