Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/thp: tracing: Hide hugepage events under CONFIG_PPC_BOOK3S_64

The events hugepage_set_pmd, hugepage_set_pud, hugepage_update_pmd and
hugepage_update_pud are only called when CONFIG_PPC_BOOK3S_64 is defined.
As each event can take up to 5K regardless if they are used or not, it's
best not to define them when they are not used. Add #ifdef around these
events when they are not used.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/20250612101259.0ad43e48@batman.local.home
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

+2
+2
include/trace/events/thp.h
··· 8 8 #include <linux/types.h> 9 9 #include <linux/tracepoint.h> 10 10 11 + #ifdef CONFIG_PPC_BOOK3S_64 11 12 DECLARE_EVENT_CLASS(hugepage_set, 12 13 13 14 TP_PROTO(unsigned long addr, unsigned long pte), ··· 67 66 TP_PROTO(unsigned long addr, unsigned long pud, unsigned long clr, unsigned long set), 68 67 TP_ARGS(addr, pud, clr, set) 69 68 ); 69 + #endif /* CONFIG_PPC_BOOK3S_64 */ 70 70 71 71 DECLARE_EVENT_CLASS(migration_pmd, 72 72