]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scripts/timers: Add timer_migration_tree.py
authorFrederic Weisbecker <frederic@kernel.org>
Thu, 23 Apr 2026 16:53:54 +0000 (18:53 +0200)
committerThomas Gleixner <tglx@kernel.org>
Wed, 6 May 2026 06:33:07 +0000 (08:33 +0200)
commitcab0cd0130eb6c884982ede3f70aca0392a7fc57
tree93b7112c96bf5463fff87e322e471d69b3a58cc2
parent5a7dfbcbbdb683e6f704966e73c02f4ba8eb6014
scripts/timers: Add timer_migration_tree.py

Introduce a script that provides a simple ascii representation of the
timer migration tree on top of boot trace events.

First boot with:

    trace_event==tmigr_connect_cpu_parent,tmigr_connect_child_parent

Then parse the result with:

scripts/timer_migration_tree.py < /sys/kernel/tracing/trace

On a system with 8 CPUs, this produces the following output:

    Tree for capacity 1024

                                      /-0, node 0, lvl:-1
                                     |
                                     |--1, node 0, lvl:-1
                                     |
                                     |--2, node 0, lvl:-1
                                     |
                                     |--3, node 0, lvl:-1
    -- /00000000dcebac8b, node 0, lvl:0
                                     |--4, node 0, lvl:-1
                                     |
                                     |--5, node 0, lvl:-1
                                     |
                                     |--6, node 0, lvl:-1
                                     |
                                      \-7, node 0, lvl:-1

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260423165354.95152-7-frederic@kernel.org
scripts/timer_migration_tree.py [new file with mode: 0755]