From: Steven Rostedt Date: Thu, 12 Jun 2025 14:12:59 +0000 (-0400) Subject: powerpc/thp: tracing: Hide hugepage events under CONFIG_PPC_BOOK3S_64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43cf0e05089afe23dac74fa6e1e109d49f2903c4;p=thirdparty%2Fkernel%2Flinux.git 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 Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Michael Ellerman Link: https://lore.kernel.org/20250612101259.0ad43e48@batman.local.home Acked-by: David Hildenbrand Acked-by: Madhavan Srinivasan Signed-off-by: Steven Rostedt (Google) --- diff --git a/include/trace/events/thp.h b/include/trace/events/thp.h index f50048af5fcc2..c8fe879d5828b 100644 --- a/include/trace/events/thp.h +++ b/include/trace/events/thp.h @@ -8,6 +8,7 @@ #include #include +#ifdef CONFIG_PPC_BOOK3S_64 DECLARE_EVENT_CLASS(hugepage_set, TP_PROTO(unsigned long addr, unsigned long pte), @@ -66,6 +67,7 @@ DEFINE_EVENT(hugepage_update, hugepage_update_pud, TP_PROTO(unsigned long addr, unsigned long pud, unsigned long clr, unsigned long set), TP_ARGS(addr, pud, clr, set) ); +#endif /* CONFIG_PPC_BOOK3S_64 */ DECLARE_EVENT_CLASS(migration_pmd,