Skip to content

Commit c2dbaf0

Browse files
committed
tracing: sched: Hide numa events under CONFIG_NUMA_BALANCING
The events sched_move_numa, sched_stick_numa and sched_swap_numa are only called when CONFIG_NUMA_BALANCING is configured. As each event can take up to 5K of memory in text and meta data regardless if they are used or not, they should not be defined when unused. Move the #ifdef CONFIG_NUMA_BALANCING to hide these events as well. Cc: Masami Hiramatsu <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/[email protected] Reviewed-by: Shrikanth Hegde <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 43cf0e0 commit c2dbaf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/trace/events/sched.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ TRACE_EVENT(sched_process_hang,
628628
);
629629
#endif /* CONFIG_DETECT_HUNG_TASK */
630630

631+
#ifdef CONFIG_NUMA_BALANCING
631632
/*
632633
* Tracks migration of tasks from one runqueue to another. Can be used to
633634
* detect if automatic NUMA balancing is bouncing between nodes.
@@ -720,7 +721,6 @@ DEFINE_EVENT(sched_numa_pair_template, sched_swap_numa,
720721
TP_ARGS(src_tsk, src_cpu, dst_tsk, dst_cpu)
721722
);
722723

723-
#ifdef CONFIG_NUMA_BALANCING
724724
#define NUMAB_SKIP_REASON \
725725
EM( NUMAB_SKIP_UNSUITABLE, "unsuitable" ) \
726726
EM( NUMAB_SKIP_SHARED_RO, "shared_ro" ) \

0 commit comments

Comments
 (0)