1 /* SPDX-License-Identifier: GPL-2.0 */
2 #if !defined(_TRACE_SPUFS_H) || defined(TRACE_HEADER_MULTI_READ)
5 #include <linux/tracepoint.h>
8 #define TRACE_SYSTEM spufs
10 TRACE_EVENT(spufs_context,
11 TP_PROTO(struct spu_context *ctx, struct spu *spu, const char *name),
12 TP_ARGS(ctx, spu, name),
15 __field(const char *, name)
16 __field(int, owner_tid)
22 __entry->owner_tid = ctx->tid;
23 __entry->number = spu ? spu->number : -1;
26 TP_printk("%s (ctxthread = %d, spu = %d)",
27 __entry->name, __entry->owner_tid, __entry->number)
30 #define spu_context_trace(name, ctx, spu) \
31 trace_spufs_context(ctx, spu, __stringify(name))
32 #define spu_context_nospu_trace(name, ctx) \
33 trace_spufs_context(ctx, NULL, __stringify(name))
35 #endif /* _TRACE_SPUFS_H */
37 #undef TRACE_INCLUDE_PATH
38 #define TRACE_INCLUDE_PATH .
39 #define TRACE_INCLUDE_FILE sputrace
40 #include <trace/define_trace.h>