aboutsummaryrefslogtreecommitdiff
path: root/bart/sched/functions.py
diff options
context:
space:
mode:
Diffstat (limited to 'bart/sched/functions.py')
-rw-r--r--bart/sched/functions.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bart/sched/functions.py b/bart/sched/functions.py
index 546e8fb..8a3d7a0 100644
--- a/bart/sched/functions.py
+++ b/bart/sched/functions.py
@@ -436,6 +436,9 @@ def get_pids_for_process(ftrace, execname, cls=None):
df = ftrace.sched_switch.data_frame
except AttributeError:
raise ValueError("SchedSwitch event not found in ftrace")
+
+ if len(df) == 0:
+ raise ValueError("SchedSwitch event not found in ftrace")
else:
event = getattr(ftrace, cls.name)
df = event.data_frame