1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Interconnect framework tracepoints 4 * Copyright (c) 2019, Linaro Ltd. 5 * Author: Georgi Djakov <georgi.djakov@linaro.org> 6 */ 7 8 #undef TRACE_SYSTEM 9 #define TRACE_SYSTEM interconnect 10 11 #if !defined(_TRACE_INTERCONNECT_H) || defined(TRACE_HEADER_MULTI_READ) 12 #define _TRACE_INTERCONNECT_H 13 14 #include <linux/interconnect.h> 15 #include <linux/tracepoint.h> 16 17 TRACE_EVENT(icc_set_bw, 18 19 TP_PROTO(struct icc_path *p, struct icc_node *n, int i, 20 u32 avg_bw, u32 peak_bw), 21 22 TP_ARGS(p, n, i, avg_bw, peak_bw), 23 24 TP_STRUCT__entry( 25 __string(path_name, p->name) 26 __string(dev, dev_name(p->reqs[i].dev)) 27 __string(node_name, n->name) 28 __field(u32, avg_bw) 29 __field(u32, peak_bw) 30 __field(u32, node_avg_bw) 31 __field(u32, node_peak_bw) 32 ), 33 34 TP_fast_assign( 35 __assign_str(path_name, p->name); 36 __assign_str(dev, dev_name(p->reqs[i].dev)); 37 __assign_str(node_name, n->name); 38 __entry->avg_bw = avg_bw; 39 __entry->peak_bw = peak_bw; 40 __entry->node_avg_bw = n->avg_bw; 41 __entry->node_peak_bw = n->peak_bw; 42 ), 43 44 TP_printk("path=%s dev=%s node=%s avg_bw=%u peak_bw=%u agg_avg=%u agg_peak=%u", 45 __get_str(path_name), 46 __get_str(dev), 47 __get_str(node_name), 48 __entry->avg_bw, 49 __entry->peak_bw, 50 __entry->node_avg_bw, 51 __entry->node_peak_bw) 52 ); 53 54 TRACE_EVENT(icc_set_bw_end, 55 56 TP_PROTO(struct icc_path *p, int ret), 57 58 TP_ARGS(p, ret), 59 60 TP_STRUCT__entry( 61 __string(path_name, p->name) 62 __string(dev, dev_name(p->reqs[0].dev)) 63 __field(int, ret) 64 ), 65 66 TP_fast_assign( 67 __assign_str(path_name, p->name); 68 __assign_str(dev, dev_name(p->reqs[0].dev)); 69 __entry->ret = ret; 70 ), 71 72 TP_printk("path=%s dev=%s ret=%d", 73 __get_str(path_name), 74 __get_str(dev), 75 __entry->ret) 76 ); 77 78 #endif /* _TRACE_INTERCONNECT_H */ 79 80 /* This part must be outside protection */ 81 82 #undef TRACE_INCLUDE_PATH 83 #define TRACE_INCLUDE_PATH . 84 85 #undef TRACE_INCLUDE_FILE 86 #define TRACE_INCLUDE_FILE trace 87 88 #include <trace/define_trace.h> 89