aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2016-04-26 17:00:22 -0500
committerClark Williams <williams@redhat.com>2016-04-26 17:00:22 -0500
commitb69ff78034a63af5ece07fb8dc87fdacc86e8d13 (patch)
treee43d53d1c2d54702f44ac15405885903cb26eadb
parent176bc949625482fd6aca875e97caf054e8aab4bb (diff)
downloadrteval-b69ff78034a63af5ece07fb8dc87fdacc86e8d13.tar.gz
cyclictest: fix tracing logic
Add the --tracemark and --notrace options to the cyclictest command line when the --cyclictest-breaktrace option has been specified. Remove the logic which tried to automatically do an extract of the trace data after a breaktrace triggered. Leave that for the user to do. Signed-off-by: Clark Williams <williams@redhat.com>
-rw-r--r--rteval/modules/measurement/cyclictest.py28
1 files changed, 8 insertions, 20 deletions
diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py
index f596665..b871695 100644
--- a/rteval/modules/measurement/cyclictest.py
+++ b/rteval/modules/measurement/cyclictest.py
@@ -274,6 +274,8 @@ class Cyclictest(rtevalModulePrototype):
if self.__cfg.has_key('breaktrace') and self.__cfg.breaktrace:
self.__cmd.append("-b%d" % int(self.__cfg.breaktrace))
+ self.__cmd.append("--tracemark")
+ self.__cmd.append("--notrace")
# Buffer for cyclictest data written to stdout
self.__cyclicoutput = tempfile.SpooledTemporaryFile(mode='rw+b')
@@ -335,7 +337,12 @@ class Cyclictest(rtevalModulePrototype):
# If we don't have any values, don't try parsing
continue
- index = int(vals[0])
+ try:
+ index = int(vals[0])
+ except:
+ self._log(Log.DEBUG, "cyclictest: unexpected output: %s" % line)
+ continue
+
for i,core in enumerate(self.__cpus):
self.__cyclicdata[core].bucket(index, int(vals[i+1]))
self.__cyclicdata['system'].bucket(index, int(vals[i+1]))
@@ -346,25 +353,6 @@ class Cyclictest(rtevalModulePrototype):
self.__cyclicdata[n].reduce()
#print self.__cyclicdata[n]
- # If the breaktrace feature of cyclictest was enabled and triggered,
- # put the trace into the log directory
- debugdir = self.__get_debugfs_mount()
- if self.__breaktraceval and debugdir:
- trace = os.path.join(debugdir, 'tracing', 'trace')
- cyclicdir = os.path.join(self.__cfg.reportdir, 'cyclictest')
- os.mkdir(cyclicdir)
- shutil.copyfile(trace, os.path.join(cyclicdir, 'breaktrace.log'))
-
- # Call trace-cmd extract to save an exportable binary blob with trace data
- # FIXME: For some odd reason, running trace-cmd outside a shell makes it fail on my test system
- tracecmd = ['sh', '-c', 'trace-cmd extract -o %s' % os.path.join(cyclicdir,'trace.dat')]
- self._log(Log.DEBUG, 'Executing: %s' % ' '.join(tracecmd))
- tracecmdproc = subprocess.Popen(tracecmd,
- stdout=self.__nullfp,
- stderr=self.__nullfp,
- stdin=self.__nullfp)
- tracecmdproc.wait()
-
self._setFinished()
self.__started = False
os.close(self.__nullfp)