Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #if !defined(_TRACE_SPUFS_H) || defined(TRACE_HEADER_MULTI_READ)
0003 #define _TRACE_SPUFS_H
0004 
0005 #include <linux/tracepoint.h>
0006 #include <linux/stringify.h>
0007 
0008 #undef TRACE_SYSTEM
0009 #define TRACE_SYSTEM spufs
0010 
0011 TRACE_EVENT(spufs_context,
0012     TP_PROTO(struct spu_context *ctx, struct spu *spu, const char *name),
0013     TP_ARGS(ctx, spu, name),
0014 
0015     TP_STRUCT__entry(
0016         __field(const char *, name)
0017         __field(int, owner_tid)
0018         __field(int, number)
0019     ),
0020 
0021     TP_fast_assign(
0022         __entry->name = name;
0023         __entry->owner_tid = ctx->tid;
0024         __entry->number = spu ? spu->number : -1;
0025     ),
0026 
0027     TP_printk("%s (ctxthread = %d, spu = %d)",
0028         __entry->name, __entry->owner_tid, __entry->number)
0029 );
0030 
0031 #define spu_context_trace(name, ctx, spu) \
0032     trace_spufs_context(ctx, spu, __stringify(name))
0033 #define spu_context_nospu_trace(name, ctx) \
0034     trace_spufs_context(ctx, NULL, __stringify(name))
0035 
0036 #endif /* _TRACE_SPUFS_H */
0037 
0038 #undef TRACE_INCLUDE_PATH
0039 #define TRACE_INCLUDE_PATH .
0040 #define TRACE_INCLUDE_FILE sputrace
0041 #include <trace/define_trace.h>