summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-05-10 19:44:14 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-10 19:44:14 -0300
commit21de19ed4bb2762de8ada3fe8162e01835c8825c (patch)
tree7269c79b1343f930d9f59371784e160d4ee1248f
parentab0121106622a8975fe7b8b8dcb97ffa31ac6424 (diff)
downloadtuna-21de19ed4bb2762de8ada3fe8162e01835c8825c.tar.gz
tuna: Make is_hardirq_handler handle non thread group leaders
Reported-by: Guy Streeter <streeter@redhat.com> RHBZ-Reference: https://bugzilla.redhat.com/show_bug.cgi?id=559770 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-xtuna/tuna.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tuna/tuna.py b/tuna/tuna.py
index f5184fb..78a399c 100755
--- a/tuna/tuna.py
+++ b/tuna/tuna.py
@@ -142,6 +142,8 @@ def list_to_cpustring(l):
# FIXME: move to python-linux-procfs
def is_hardirq_handler(self, pid):
PF_HARDIRQ = 0x08000000
+ if not self.processes.has_key(pid):
+ return False
return int(self.processes[pid]["stat"]["flags"]) & \
PF_HARDIRQ and True or False