1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Interconnect framework tracepoints
4 * Copyright (c) 2019, Linaro Ltd.
5 * Author: Georgi Djakov <georgi.djakov@linaro.org>
9 #define TRACE_SYSTEM interconnect
11 #if !defined(_TRACE_INTERCONNECT_H) || defined(TRACE_HEADER_MULTI_READ)
12 #define _TRACE_INTERCONNECT_H
14 #include <linux/interconnect.h>
15 #include <linux/tracepoint.h>
17 TRACE_EVENT(icc_set_bw,
19 TP_PROTO(struct icc_path *p, struct icc_node *n, int i,
20 u32 avg_bw, u32 peak_bw),
22 TP_ARGS(p, n, i, avg_bw, peak_bw),
25 __string(path_name, p->name)
26 __string(dev, dev_name(p->reqs[i].dev))
27 __string(node_name, n->name)
30 __field(u32, node_avg_bw)
31 __field(u32, node_peak_bw)
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;
44 TP_printk("path=%s dev=%s node=%s avg_bw=%u peak_bw=%u agg_avg=%u agg_peak=%u",
51 __entry->node_peak_bw)
54 TRACE_EVENT(icc_set_bw_end,
56 TP_PROTO(struct icc_path *p, int ret),
61 __string(path_name, p->name)
62 __string(dev, dev_name(p->reqs[0].dev))
67 __assign_str(path_name, p->name);
68 __assign_str(dev, dev_name(p->reqs[0].dev));
72 TP_printk("path=%s dev=%s ret=%d",
78 #endif /* _TRACE_INTERCONNECT_H */
80 /* This part must be outside protection */
82 #undef TRACE_INCLUDE_PATH
83 #define TRACE_INCLUDE_PATH .
85 #undef TRACE_INCLUDE_FILE
86 #define TRACE_INCLUDE_FILE trace
88 #include <trace/define_trace.h>