mirror-linux/tools
Kohei Enju f92ff79ba2 tools/sched_ext: fix scx_show_state.py for scx_root change
Commit 48e1267773 ("sched_ext: Introduce scx_sched") introduced
scx_root and removed scx_ops, causing scx_show_state.py to fail when
searching for the 'scx_ops' object. [1]

Fix by using 'scx_root' instead, with NULL pointer handling.

[1]
 # drgn -s vmlinux ./tools/sched_ext/scx_show_state.py
 Traceback (most recent call last):
   File "/root/.venv/bin/drgn", line 8, in <module>
     sys.exit(_main())
              ~~~~~^^
   File "/root/.venv/lib64/python3.14/site-packages/drgn/cli.py", line 625, in _main
     runpy.run_path(
     ~~~~~~~~~~~~~~^
         script_path, init_globals={"prog": prog}, run_name="__main__"
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     )
     ^
   File "<frozen runpy>", line 287, in run_path
   File "<frozen runpy>", line 98, in _run_module_code
   File "<frozen runpy>", line 88, in _run_code
   File "./tools/sched_ext/scx_show_state.py", line 30, in <module>
     ops = prog['scx_ops']
           ~~~~^^^^^^^^^^^
 _drgn.ObjectNotFoundError: could not find 'scx_ops'

Fixes: 48e1267773 ("sched_ext: Introduce scx_sched")
Signed-off-by: Kohei Enju <enjuk@amazon.com>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-12-28 06:11:13 -10:00
..
accounting
arch [GIT PULL] perf tools changes for v6.19 2025-12-07 07:07:02 -08:00
bootconfig
bpf bpf: Remove runqslower tool 2025-11-28 15:20:16 -08:00
build [GIT PULL] perf tools changes for v6.19 2025-12-07 07:07:02 -08:00
certs
cgroup
counter
crypto
debugging
dma dma-mapping updates for Linux 6.19: 2025-12-06 09:25:05 -08:00
docs docs: makefile: move rustdoc check to the build wrapper 2025-11-29 08:42:53 -07:00
firewire
firmware
gpio
hv
iio
include [GIT PULL] perf tools changes for v6.19 2025-12-07 07:07:02 -08:00
kvm/kvm_stat
laptop
leds
lib [GIT PULL] perf tools changes for v6.19 2025-12-07 07:07:02 -08:00
memory-model
mm tools/mm/page_owner_sort: add help option support 2025-11-16 17:28:06 -08:00
net NFSD 6.19 Release Notes 2025-12-06 10:57:02 -08:00
objtool objtool: Add more robust signal error handling, detect and warn about stack overflows 2025-12-03 19:42:37 +01:00
pcmcia
perf [GIT PULL] perf tools changes for v6.19 2025-12-07 07:07:02 -08:00
power turbostat-v2025.12.02 2025-12-06 09:35:00 -08:00
rcu
sched
sched_ext tools/sched_ext: fix scx_show_state.py for scx_root change 2025-12-28 06:11:13 -10:00
scripts
sound
spi
testing selftests/sched_ext: flush stdout before test to avoid log spam 2025-12-12 08:18:32 -10:00
thermal tools/thermal/thermal-engine: Fix format string bug in thermal-engine 2025-11-25 11:00:28 +01:00
time
tracing rtla updaets for v6.19: 2025-12-05 09:34:01 -08:00
usb
verification
virtio
wmi
workqueue
writeback
Makefile