diff options
author | Bitao Hu <yaoma@linux.alibaba.com> | 2024-04-11 15:41:30 +0800 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-04-12 17:08:05 +0200 |
commit | 86d2a2f51fbada84e377665df06b5a479a1edc99 (patch) | |
tree | 4d4841bbc3a1d129a8cc9d6793bb19fb52553720 /scripts/gdb | |
parent | 81e4cb0fd45c84d416e3edffbf6ae62c89ce6b5a (diff) | |
download | linux-86d2a2f51fbada84e377665df06b5a479a1edc99.tar.gz linux-86d2a2f51fbada84e377665df06b5a479a1edc99.tar.bz2 linux-86d2a2f51fbada84e377665df06b5a479a1edc99.zip |
genirq: Convert kstat_irqs to a struct
The irq_desc::kstat_irqs member is a per-CPU variable of type int, which is
only capable of counting. A snapshot mechanism for interrupt statistics
will be added soon, which requires an additional variable to store the
snapshot.
To facilitate expansion, convert kstat_irqs here to a struct containing
only the count.
Originally-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Bitao Hu <yaoma@linux.alibaba.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240411074134.30922-2-yaoma@linux.alibaba.com
Diffstat (limited to 'scripts/gdb')
-rw-r--r-- | scripts/gdb/linux/interrupts.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/gdb/linux/interrupts.py b/scripts/gdb/linux/interrupts.py index 66ae5c7690cf..616a5f26377a 100644 --- a/scripts/gdb/linux/interrupts.py +++ b/scripts/gdb/linux/interrupts.py @@ -37,7 +37,7 @@ def show_irq_desc(prec, irq): any_count = 0 if desc['kstat_irqs']: for cpu in cpus.each_online_cpu(): - any_count += cpus.per_cpu(desc['kstat_irqs'], cpu) + any_count += cpus.per_cpu(desc['kstat_irqs'], cpu)['cnt'] if (desc['action'] == 0 or irq_desc_is_chained(desc)) and any_count == 0: return text; @@ -45,7 +45,7 @@ def show_irq_desc(prec, irq): text += "%*d: " % (prec, irq) for cpu in cpus.each_online_cpu(): if desc['kstat_irqs']: - count = cpus.per_cpu(desc['kstat_irqs'], cpu) + count = cpus.per_cpu(desc['kstat_irqs'], cpu)['cnt'] else: count = 0 text += "%10u" % (count) @@ -177,7 +177,7 @@ def arm_common_show_interrupts(prec): if desc == 0: continue for cpu in cpus.each_online_cpu(): - text += "%10u" % (cpus.per_cpu(desc['kstat_irqs'], cpu)) + text += "%10u" % (cpus.per_cpu(desc['kstat_irqs'], cpu)['cnt']) text += " %s" % (ipi_types[ipi].string()) text += "\n" return text |