]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
powerpc/thp: tracing: Hide hugepage events under CONFIG_PPC_BOOK3S_64
authorSteven Rostedt <rostedt@goodmis.org>
Thu, 12 Jun 2025 14:12:59 +0000 (10:12 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 25 Jul 2025 12:58:07 +0000 (08:58 -0400)
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>
include/trace/events/thp.h

index f50048af5fcc2877a0eef6626ba06992e206ee73..c8fe879d5828bdc08728029bbb31a36d63aceeb0 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/types.h>
 #include <linux/tracepoint.h>
 
+#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,