perf hists: Move sort__has_sym into struct perf_hpp_list
[linux/fpc-iii.git] / include / trace / events / host1x.h
blob63116362543c7c3d58a207cbd4e19fb1828b9eeb
1 /*
2 * include/trace/events/host1x.h
4 * host1x event logging to ftrace.
6 * Copyright (c) 2010-2013, NVIDIA Corporation.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #undef TRACE_SYSTEM
24 #define TRACE_SYSTEM host1x
26 #if !defined(_TRACE_HOST1X_H) || defined(TRACE_HEADER_MULTI_READ)
27 #define _TRACE_HOST1X_H
29 #include <linux/ktime.h>
30 #include <linux/tracepoint.h>
32 struct host1x_bo;
34 DECLARE_EVENT_CLASS(host1x,
35 TP_PROTO(const char *name),
36 TP_ARGS(name),
37 TP_STRUCT__entry(__field(const char *, name)),
38 TP_fast_assign(__entry->name = name;),
39 TP_printk("name=%s", __entry->name)
42 DEFINE_EVENT(host1x, host1x_channel_open,
43 TP_PROTO(const char *name),
44 TP_ARGS(name)
47 DEFINE_EVENT(host1x, host1x_channel_release,
48 TP_PROTO(const char *name),
49 TP_ARGS(name)
52 DEFINE_EVENT(host1x, host1x_cdma_begin,
53 TP_PROTO(const char *name),
54 TP_ARGS(name)
57 DEFINE_EVENT(host1x, host1x_cdma_end,
58 TP_PROTO(const char *name),
59 TP_ARGS(name)
62 TRACE_EVENT(host1x_cdma_push,
63 TP_PROTO(const char *name, u32 op1, u32 op2),
65 TP_ARGS(name, op1, op2),
67 TP_STRUCT__entry(
68 __field(const char *, name)
69 __field(u32, op1)
70 __field(u32, op2)
73 TP_fast_assign(
74 __entry->name = name;
75 __entry->op1 = op1;
76 __entry->op2 = op2;
79 TP_printk("name=%s, op1=%08x, op2=%08x",
80 __entry->name, __entry->op1, __entry->op2)
83 TRACE_EVENT(host1x_cdma_push_gather,
84 TP_PROTO(const char *name, struct host1x_bo *bo,
85 u32 words, u32 offset, void *cmdbuf),
87 TP_ARGS(name, bo, words, offset, cmdbuf),
89 TP_STRUCT__entry(
90 __field(const char *, name)
91 __field(struct host1x_bo *, bo)
92 __field(u32, words)
93 __field(u32, offset)
94 __field(bool, cmdbuf)
95 __dynamic_array(u32, cmdbuf, words)
98 TP_fast_assign(
99 if (cmdbuf) {
100 memcpy(__get_dynamic_array(cmdbuf), cmdbuf+offset,
101 words * sizeof(u32));
103 __entry->cmdbuf = cmdbuf;
104 __entry->name = name;
105 __entry->bo = bo;
106 __entry->words = words;
107 __entry->offset = offset;
110 TP_printk("name=%s, bo=%p, words=%u, offset=%d, contents=[%s]",
111 __entry->name, __entry->bo,
112 __entry->words, __entry->offset,
113 __print_hex(__get_dynamic_array(cmdbuf),
114 __entry->cmdbuf ? __entry->words * 4 : 0))
117 TRACE_EVENT(host1x_channel_submit,
118 TP_PROTO(const char *name, u32 cmdbufs, u32 relocs, u32 waitchks,
119 u32 syncpt_id, u32 syncpt_incrs),
121 TP_ARGS(name, cmdbufs, relocs, waitchks, syncpt_id, syncpt_incrs),
123 TP_STRUCT__entry(
124 __field(const char *, name)
125 __field(u32, cmdbufs)
126 __field(u32, relocs)
127 __field(u32, waitchks)
128 __field(u32, syncpt_id)
129 __field(u32, syncpt_incrs)
132 TP_fast_assign(
133 __entry->name = name;
134 __entry->cmdbufs = cmdbufs;
135 __entry->relocs = relocs;
136 __entry->waitchks = waitchks;
137 __entry->syncpt_id = syncpt_id;
138 __entry->syncpt_incrs = syncpt_incrs;
141 TP_printk("name=%s, cmdbufs=%u, relocs=%u, waitchks=%d,"
142 "syncpt_id=%u, syncpt_incrs=%u",
143 __entry->name, __entry->cmdbufs, __entry->relocs, __entry->waitchks,
144 __entry->syncpt_id, __entry->syncpt_incrs)
147 TRACE_EVENT(host1x_channel_submitted,
148 TP_PROTO(const char *name, u32 syncpt_base, u32 syncpt_max),
150 TP_ARGS(name, syncpt_base, syncpt_max),
152 TP_STRUCT__entry(
153 __field(const char *, name)
154 __field(u32, syncpt_base)
155 __field(u32, syncpt_max)
158 TP_fast_assign(
159 __entry->name = name;
160 __entry->syncpt_base = syncpt_base;
161 __entry->syncpt_max = syncpt_max;
164 TP_printk("name=%s, syncpt_base=%d, syncpt_max=%d",
165 __entry->name, __entry->syncpt_base, __entry->syncpt_max)
168 TRACE_EVENT(host1x_channel_submit_complete,
169 TP_PROTO(const char *name, int count, u32 thresh),
171 TP_ARGS(name, count, thresh),
173 TP_STRUCT__entry(
174 __field(const char *, name)
175 __field(int, count)
176 __field(u32, thresh)
179 TP_fast_assign(
180 __entry->name = name;
181 __entry->count = count;
182 __entry->thresh = thresh;
185 TP_printk("name=%s, count=%d, thresh=%d",
186 __entry->name, __entry->count, __entry->thresh)
189 TRACE_EVENT(host1x_wait_cdma,
190 TP_PROTO(const char *name, u32 eventid),
192 TP_ARGS(name, eventid),
194 TP_STRUCT__entry(
195 __field(const char *, name)
196 __field(u32, eventid)
199 TP_fast_assign(
200 __entry->name = name;
201 __entry->eventid = eventid;
204 TP_printk("name=%s, event=%d", __entry->name, __entry->eventid)
207 TRACE_EVENT(host1x_syncpt_load_min,
208 TP_PROTO(u32 id, u32 val),
210 TP_ARGS(id, val),
212 TP_STRUCT__entry(
213 __field(u32, id)
214 __field(u32, val)
217 TP_fast_assign(
218 __entry->id = id;
219 __entry->val = val;
222 TP_printk("id=%d, val=%d", __entry->id, __entry->val)
225 TRACE_EVENT(host1x_syncpt_wait_check,
226 TP_PROTO(struct host1x_bo *bo, u32 offset, u32 syncpt_id, u32 thresh,
227 u32 min),
229 TP_ARGS(bo, offset, syncpt_id, thresh, min),
231 TP_STRUCT__entry(
232 __field(struct host1x_bo *, bo)
233 __field(u32, offset)
234 __field(u32, syncpt_id)
235 __field(u32, thresh)
236 __field(u32, min)
239 TP_fast_assign(
240 __entry->bo = bo;
241 __entry->offset = offset;
242 __entry->syncpt_id = syncpt_id;
243 __entry->thresh = thresh;
244 __entry->min = min;
247 TP_printk("bo=%p, offset=%05x, id=%d, thresh=%d, current=%d",
248 __entry->bo, __entry->offset,
249 __entry->syncpt_id, __entry->thresh,
250 __entry->min)
253 #endif /* _TRACE_HOST1X_H */
255 /* This part must be outside protection */
256 #include <trace/define_trace.h>