thp.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM thp
  3. #if !defined(_TRACE_THP_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_THP_H
  5. #include <linux/types.h>
  6. #include <linux/tracepoint.h>
  7. TRACE_EVENT(hugepage_invalidate,
  8. TP_PROTO(unsigned long addr, unsigned long pte),
  9. TP_ARGS(addr, pte),
  10. TP_STRUCT__entry(
  11. __field(unsigned long, addr)
  12. __field(unsigned long, pte)
  13. ),
  14. TP_fast_assign(
  15. __entry->addr = addr;
  16. __entry->pte = pte;
  17. ),
  18. TP_printk("hugepage invalidate at addr 0x%lx and pte = 0x%lx",
  19. __entry->addr, __entry->pte)
  20. );
  21. TRACE_EVENT(hugepage_set_pmd,
  22. TP_PROTO(unsigned long addr, unsigned long pmd),
  23. TP_ARGS(addr, pmd),
  24. TP_STRUCT__entry(
  25. __field(unsigned long, addr)
  26. __field(unsigned long, pmd)
  27. ),
  28. TP_fast_assign(
  29. __entry->addr = addr;
  30. __entry->pmd = pmd;
  31. ),
  32. TP_printk("Set pmd with 0x%lx with 0x%lx", __entry->addr, __entry->pmd)
  33. );
  34. TRACE_EVENT(hugepage_update,
  35. TP_PROTO(unsigned long addr, unsigned long pte, unsigned long clr, unsigned long set),
  36. TP_ARGS(addr, pte, clr, set),
  37. TP_STRUCT__entry(
  38. __field(unsigned long, addr)
  39. __field(unsigned long, pte)
  40. __field(unsigned long, clr)
  41. __field(unsigned long, set)
  42. ),
  43. TP_fast_assign(
  44. __entry->addr = addr;
  45. __entry->pte = pte;
  46. __entry->clr = clr;
  47. __entry->set = set;
  48. ),
  49. TP_printk("hugepage update at addr 0x%lx and pte = 0x%lx clr = 0x%lx, set = 0x%lx", __entry->addr, __entry->pte, __entry->clr, __entry->set)
  50. );
  51. TRACE_EVENT(hugepage_splitting,
  52. TP_PROTO(unsigned long addr, unsigned long pte),
  53. TP_ARGS(addr, pte),
  54. TP_STRUCT__entry(
  55. __field(unsigned long, addr)
  56. __field(unsigned long, pte)
  57. ),
  58. TP_fast_assign(
  59. __entry->addr = addr;
  60. __entry->pte = pte;
  61. ),
  62. TP_printk("hugepage splitting at addr 0x%lx and pte = 0x%lx",
  63. __entry->addr, __entry->pte)
  64. );
  65. #endif /* _TRACE_THP_H */
  66. /* This part must be outside protection */
  67. #include <trace/define_trace.h>