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

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