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

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