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