Trace sched events from stage1

Events from the kthread that dumps the buffer to the console are
filtered, otherwise we make an infinite loop.
This commit is contained in:
Rodrigo Arias 2024-07-05 15:15:53 +02:00
parent f509a0a517
commit 934b67ac0b

View File

@ -87,6 +87,16 @@
preDeviceCommands = '' preDeviceCommands = ''
echo "Creating a heartbeat counter at 0x1bfff0000" echo "Creating a heartbeat counter at 0x1bfff0000"
sh -c 'hb=0; while [ 1 ]; do let hb=$hb+1; devmem 0x1bfff0000 32 $hb; done' & sh -c 'hb=0; while [ 1 ]; do let hb=$hb+1; devmem 0x1bfff0000 32 $hb; done' &
''
+
# 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
# events.
''
echo "Exclude pid 2 from sched"
echo '(prev_pid != 2 && next_pid != 2)' > /sys/kernel/debug/tracing/events/sched/filter
echo "Enable all events from sched subsystem"
echo 1 > /sys/kernel/debug/tracing/events/sched/enable
''; '';
}; };