]> git.ipfire.org Git - thirdparty/kernel/linux.git/blob - arch/powerpc/platforms/cell/spufs/sputrace.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[thirdparty/kernel/linux.git] / arch / powerpc / platforms / cell / spufs / sputrace.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #if !defined(_TRACE_SPUFS_H) || defined(TRACE_HEADER_MULTI_READ)
3 #define _TRACE_SPUFS_H
4
5 #include <linux/tracepoint.h>
6
7 #undef TRACE_SYSTEM
8 #define TRACE_SYSTEM spufs
9
10 TRACE_EVENT(spufs_context,
11 TP_PROTO(struct spu_context *ctx, struct spu *spu, const char *name),
12 TP_ARGS(ctx, spu, name),
13
14 TP_STRUCT__entry(
15 __field(const char *, name)
16 __field(int, owner_tid)
17 __field(int, number)
18 ),
19
20 TP_fast_assign(
21 __entry->name = name;
22 __entry->owner_tid = ctx->tid;
23 __entry->number = spu ? spu->number : -1;
24 ),
25
26 TP_printk("%s (ctxthread = %d, spu = %d)",
27 __entry->name, __entry->owner_tid, __entry->number)
28 );
29
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))
34
35 #endif /* _TRACE_SPUFS_H */
36
37 #undef TRACE_INCLUDE_PATH
38 #define TRACE_INCLUDE_PATH .
39 #define TRACE_INCLUDE_FILE sputrace
40 #include <trace/define_trace.h>