History

mm/migration: add trace events for THP migrations

Patch series "mm/migration: Add trace events", v3. This adds trace events for all migration scenarios including base page, THP and HugeTLB. This patch (of 3): This adds two trace events for PMD based THP migration without split. These events closely follow the implementation details like setting and removing of PMD migration entries, which are essential operations for THP migration. This moves CREATE_TRACE_POINTS into generic THP from powerpc for these new trace events to be available on other platforms as well.

Anshuman Khandual committed 4 years ago

Commit 283fd6f1 parent 5d543f13 files · +32 −1Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/trace/events/thp.h+27−0
@@ -48,6 +48,33 @@ TRACE_EVENT(hugepage_update, · 47 unmodified lines
48 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)48 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)
49);49);
50 50
51DECLARE_EVENT_CLASS(migration_pmd,
52
53 TP_PROTO(unsigned long addr, unsigned long pmd),
54
55 TP_ARGS(addr, pmd),
56
57 TP_STRUCT__entry(
58 __field(unsigned long, addr)
59 __field(unsigned long, pmd)
60 ),
61
62 TP_fast_assign(
63 __entry->addr = addr;
64 __entry->pmd = pmd;
65 ),
66 TP_printk("addr=%lx, pmd=%lx", __entry->addr, __entry->pmd)
67);
68
69DEFINE_EVENT(migration_pmd, set_migration_pmd,
70 TP_PROTO(unsigned long addr, unsigned long pmd),
71 TP_ARGS(addr, pmd)
72);
73
74DEFINE_EVENT(migration_pmd, remove_migration_pmd,
75 TP_PROTO(unsigned long addr, unsigned long pmd),
76 TP_ARGS(addr, pmd)
77);
51#endif /* _TRACE_THP_H */78#endif /* _TRACE_THP_H */
52 79
53/* This part must be outside protection */80/* This part must be outside protection */