sputrace.h 964 B

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