thp.h 2.1 KB

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