rseq.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. #undef TRACE_SYSTEM
  3. #define TRACE_SYSTEM rseq
  4. #if !defined(_TRACE_RSEQ_H) || defined(TRACE_HEADER_MULTI_READ)
  5. #define _TRACE_RSEQ_H
  6. #include <linux/tracepoint.h>
  7. #include <linux/types.h>
  8. TRACE_EVENT(rseq_update,
  9. TP_PROTO(struct task_struct *t),
  10. TP_ARGS(t),
  11. TP_STRUCT__entry(
  12. __field(s32, cpu_id)
  13. ),
  14. TP_fast_assign(
  15. __entry->cpu_id = raw_smp_processor_id();
  16. ),
  17. TP_printk("cpu_id=%d", __entry->cpu_id)
  18. );
  19. TRACE_EVENT(rseq_ip_fixup,
  20. TP_PROTO(unsigned long regs_ip, unsigned long start_ip,
  21. unsigned long post_commit_offset, unsigned long abort_ip),
  22. TP_ARGS(regs_ip, start_ip, post_commit_offset, abort_ip),
  23. TP_STRUCT__entry(
  24. __field(unsigned long, regs_ip)
  25. __field(unsigned long, start_ip)
  26. __field(unsigned long, post_commit_offset)
  27. __field(unsigned long, abort_ip)
  28. ),
  29. TP_fast_assign(
  30. __entry->regs_ip = regs_ip;
  31. __entry->start_ip = start_ip;
  32. __entry->post_commit_offset = post_commit_offset;
  33. __entry->abort_ip = abort_ip;
  34. ),
  35. TP_printk("regs_ip=0x%lx start_ip=0x%lx post_commit_offset=%lu abort_ip=0x%lx",
  36. __entry->regs_ip, __entry->start_ip,
  37. __entry->post_commit_offset, __entry->abort_ip)
  38. );
  39. #endif /* _TRACE_SOCK_H */
  40. /* This part must be outside protection */
  41. #include <trace/define_trace.h>