aboutsummaryrefslogtreecommitdiffstats
path: root/run/tracer.py
diff options
context:
space:
mode:
Diffstat (limited to 'run/tracer.py')
-rw-r--r--run/tracer.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/run/tracer.py b/run/tracer.py
index 303aae0..065797c 100644
--- a/run/tracer.py
+++ b/run/tracer.py
@@ -1,7 +1,7 @@
1from . import litmus_util
2import os 1import os
3import config.config as conf 2import config.config as conf
4 3
4from common import is_device,num_cpus
5from operator import methodcaller 5from operator import methodcaller
6from run.executable.ftcat import FTcat,Executable 6from run.executable.ftcat import FTcat,Executable
7 7
@@ -58,7 +58,7 @@ class LogTracer(Tracer):
58 58
59 @staticmethod 59 @staticmethod
60 def enabled(): 60 def enabled():
61 return litmus_util.is_device(LogTracer.DEVICE_STR) 61 return is_device(LogTracer.DEVICE_STR)
62 62
63 def stop_tracing(self): 63 def stop_tracing(self):
64 map(methodcaller('interrupt'), self.bins) 64 map(methodcaller('interrupt'), self.bins)
@@ -71,7 +71,7 @@ class SchedTracer(Tracer):
71 super(SchedTracer, self).__init__("Sched Trace", output_dir) 71 super(SchedTracer, self).__init__("Sched Trace", output_dir)
72 72
73 if SchedTracer.enabled(): 73 if SchedTracer.enabled():
74 for cpu in range(litmus_util.num_cpus()): 74 for cpu in range(num_cpus()):
75 # Executable will close the stdout/stderr files 75 # Executable will close the stdout/stderr files
76 stdout_f = open('%s/st-%d.bin' % (self.output_dir, cpu), 'w') 76 stdout_f = open('%s/st-%d.bin' % (self.output_dir, cpu), 'w')
77 stderr_f = open('%s/st-%d-stderr.txt' % (self.output_dir, cpu), 'w') 77 stderr_f = open('%s/st-%d-stderr.txt' % (self.output_dir, cpu), 'w')
@@ -83,7 +83,7 @@ class SchedTracer(Tracer):
83 83
84 @staticmethod 84 @staticmethod
85 def enabled(): 85 def enabled():
86 return litmus_util.is_device("%s%d" % (SchedTracer.DEVICE_STR, 0)) 86 return is_device("%s%d" % (SchedTracer.DEVICE_STR, 0))
87 87
88class OverheadTracer(Tracer): 88class OverheadTracer(Tracer):
89 DEVICE_STR = '/dev/litmus/ft_trace0' 89 DEVICE_STR = '/dev/litmus/ft_trace0'
@@ -100,7 +100,7 @@ class OverheadTracer(Tracer):
100 100
101 @staticmethod 101 @staticmethod
102 def enabled(): 102 def enabled():
103 return litmus_util.is_device(OverheadTracer.DEVICE_STR) 103 return is_device(OverheadTracer.DEVICE_STR)
104 104
105class PerfTracer(Tracer): 105class PerfTracer(Tracer):
106 def __init__(self, output_dir): 106 def __init__(self, output_dir):