Blame SOURCES/tuna-Fix-matching-irqs-in-ps_show_thread.patch

5aedf2
From 3f1fbb092f5ef07d04fef7ddec9e538f36d84450 Mon Sep 17 00:00:00 2001
5aedf2
From: John Kacur <jkacur@redhat.com>
5aedf2
Date: Fri, 2 Sep 2022 11:55:07 -0400
5aedf2
Subject: [PATCH] tuna: Fix matching irqs in ps_show_thread
5aedf2
5aedf2
The new format to match irqs is "irqs/"
5aedf2
We already test this when we call is_irq_thread(cmd):
5aedf2
5aedf2
With this fix if you do
5aedf2
5aedf2
tuna show_threads
5aedf2
5aedf2
You will get nic information that was previously missed such as
5aedf2
5aedf2
  986     FIFO    50        9     69286            2 irq/164-iwlwifi:default_que
5aedf2
ue iwlwifi:default_queue
5aedf2
5aedf2
Signed-off-by: John Kacur <jkacur@redhat.com>
5aedf2
---
5aedf2
 tuna-cmd.py | 15 +++++----------
5aedf2
 1 file changed, 5 insertions(+), 10 deletions(-)
5aedf2
5aedf2
diff --git a/tuna-cmd.py b/tuna-cmd.py
5aedf2
index b13b25b8a801..80e27523acc6 100755
5aedf2
--- a/tuna-cmd.py
5aedf2
+++ b/tuna-cmd.py
5aedf2
@@ -351,17 +351,12 @@ def ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info, sock_inodes,
5aedf2
         try:
5aedf2
             if not irqs:
5aedf2
                 irqs = procfs.interrupts()
5aedf2
-            if cmd[:4] == "IRQ-":
5aedf2
-                users = irqs[tuna.irq_thread_number(cmd)]["users"]
5aedf2
-                for u in users:
5aedf2
-                    if u in get_nics():
5aedf2
-                        users[users.index(u)] = "%s(%s)" % (
5aedf2
-                            u, ethtool.get_module(u))
5aedf2
-                users = ",".join(users)
5aedf2
-            else:
5aedf2
-                u = cmd[cmd.find('-') + 1:]
5aedf2
+            users = irqs[tuna.irq_thread_number(cmd)]["users"]
5aedf2
+            for u in users:
5aedf2
                 if u in get_nics():
5aedf2
-                    users = ethtool.get_module(u)
5aedf2
+                    users[users.index(u)] = "%s(%s)" % (
5aedf2
+                        u, ethtool.get_module(u))
5aedf2
+            users = ",".join(users)
5aedf2
         except:
5aedf2
             users = "Not found in /proc/interrupts!"
5aedf2
 
5aedf2
-- 
5aedf2
2.37.3
5aedf2