Only enable sched_switch events

As sched_stat_runtime is flooding the console.
This commit is contained in:
Rodrigo Arias 2024-07-05 15:37:50 +02:00
parent bc05dc2676
commit 32f4d117db

View File

@ -90,16 +90,16 @@
'' ''
+ +
# Exclude the second pid, which is the kthread that will dump the trace to # Exclude the second pid, which is the kthread that will dump the trace to
# the console, otherwise we live lock the kernel. Then enable the sched # the console, otherwise we live lock the kernel. Then enable the
# events. # sched_switch events.
'' ''
echo "Mount debugfs" echo "Mount debugfs"
mkdir -p /sys/kernel/debug/ mkdir -p /sys/kernel/debug/
mount -t debugfs none /sys/kernel/debug/ mount -t debugfs none /sys/kernel/debug/
echo "Exclude pid 2 from sched" echo "Exclude pid 2 from sched"
echo '(prev_pid != 2 && next_pid != 2)' > /sys/kernel/debug/tracing/events/sched/filter echo '(prev_pid != 2 && next_pid != 2)' > /sys/kernel/debug/tracing/events/sched/filter
echo "Enable all events from sched subsystem" echo "Enable sched_switch events"
echo 1 > /sys/kernel/debug/tracing/events/sched/enable echo 1 > /sys/kernel/debug/tracing/events/sched/sched_switch/enable
''; '';
}; };