sputrace.h 1003 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #if !defined(_TRACE_SPUFS_H) || defined(TRACE_HEADER_MULTI_READ)
  3. #define _TRACE_SPUFS_H
  4. #include <linux/tracepoint.h>
  5. #undef TRACE_SYSTEM
  6. #define TRACE_SYSTEM spufs
  7. TRACE_EVENT(spufs_context,
  8. TP_PROTO(struct spu_context *ctx, struct spu *spu, const char *name),
  9. TP_ARGS(ctx, spu, name),
  10. TP_STRUCT__entry(
  11. __field(const char *, name)
  12. __field(int, owner_tid)
  13. __field(int, number)
  14. ),
  15. TP_fast_assign(
  16. __entry->name = name;
  17. __entry->owner_tid = ctx->tid;
  18. __entry->number = spu ? spu->number : -1;
  19. ),
  20. TP_printk("%s (ctxthread = %d, spu = %d)",
  21. __entry->name, __entry->owner_tid, __entry->number)
  22. );
  23. #define spu_context_trace(name, ctx, spu) \
  24. trace_spufs_context(ctx, spu, __stringify(name))
  25. #define spu_context_nospu_trace(name, ctx) \
  26. trace_spufs_context(ctx, NULL, __stringify(name))
  27. #endif /* _TRACE_SPUFS_H */
  28. #undef TRACE_INCLUDE_PATH
  29. #define TRACE_INCLUDE_PATH .
  30. #define TRACE_INCLUDE_FILE sputrace
  31. #include <trace/define_trace.h>