92 lines
3.5 KiB
Diff
92 lines
3.5 KiB
Diff
From 5edb31a58bea3c2433e817439e053b79221a06df Mon Sep 17 00:00:00 2001
|
|
From: John Kacur <jkacur@redhat.com>
|
|
Date: Fri, 13 Dec 2024 15:07:09 -0500
|
|
Subject: [PATCH] rteval: Fix missing statistics for system with timerlat
|
|
|
|
Fix missing statistics for the system with timerlat by fixing the test
|
|
in rteval_test.xsl for stoptrace_invoked
|
|
|
|
In addition
|
|
- Add --no-summary to the rtla command line
|
|
- Parse out "ALL:" for good measure although this should be surpressed
|
|
with the --no-summary command line option.
|
|
- timerlat reports stop tracing when receiving a SIGINT, so also check
|
|
whether the maximum value is greater than the --timerlat-stoptrace value
|
|
|
|
Tested the following scenarios.
|
|
- timerlat-stoptrace USEC is NOT used
|
|
- timerlat-stoptrace USEC is used AND the max value recorded is greater
|
|
than the value to trigger stop tracing
|
|
- timerlat-stoptrace USEC is used AND the max value recorded is not
|
|
greater than the value to trigger stop tracing
|
|
|
|
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
---
|
|
rteval/modules/measurement/timerlat.py | 14 +++++++++++---
|
|
rteval/rteval_text.xsl | 2 +-
|
|
2 files changed, 12 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/rteval/modules/measurement/timerlat.py b/rteval/modules/measurement/timerlat.py
|
|
index 3fcdb5ff2819..5bfc495217ea 100644
|
|
--- a/rteval/modules/measurement/timerlat.py
|
|
+++ b/rteval/modules/measurement/timerlat.py
|
|
@@ -230,6 +230,7 @@ class Timerlat(rtevalModulePrototype):
|
|
self.__cmd = ['rtla', 'timerlat', 'hist', self.__interval, '-P', f'f:{int(self.__priority)}', '-u']
|
|
self.__cmd.append(f'-c{self.__cpulist}')
|
|
self.__cmd.append(f'-E{self.__buckets}')
|
|
+ self.__cmd.append('--no-summary')
|
|
|
|
if self.__cfg.stoptrace:
|
|
self.__cmd.append(f"-T{int(self.__cfg.stoptrace)}")
|
|
@@ -392,6 +393,10 @@ class Timerlat(rtevalModulePrototype):
|
|
self.__stoptrace = True
|
|
self.__posttrace += line
|
|
continue
|
|
+ elif line.startswith('ALL:'):
|
|
+ # We should only see 'ALL:' without timerlat --no-summary
|
|
+ # print(line)
|
|
+ continue
|
|
else:
|
|
#print(line)
|
|
pass
|
|
@@ -424,17 +429,20 @@ class Timerlat(rtevalModulePrototype):
|
|
for n in list(self.__timerlatdata.keys()):
|
|
self.__timerlatdata[n].reduce()
|
|
|
|
- self.__timerlat_out.close()
|
|
-
|
|
self._setFinished()
|
|
self.__started = False
|
|
|
|
+ self.__timerlat_err.close()
|
|
+ self.__timerlat_out.close()
|
|
+
|
|
def MakeReport(self):
|
|
rep_n = libxml2.newNode('timerlat')
|
|
rep_n.newProp('command_line', ' '.join(self.__cmd))
|
|
|
|
+ max_val = self.__timerlatdata['system'].max
|
|
+
|
|
stoptrace_invoked_n = libxml2.newNode('stoptrace_invoked')
|
|
- if self.stcpu != -1:
|
|
+ if self.stcpu != -1 and max_val > int(self.__cfg.stoptrace):
|
|
stoptrace_invoked_n.newProp("invoked", "true")
|
|
else:
|
|
stoptrace_invoked_n.newProp("invoked", "")
|
|
diff --git a/rteval/rteval_text.xsl b/rteval/rteval_text.xsl
|
|
index 70f3e0fd4b1c..146302744f58 100644
|
|
--- a/rteval/rteval_text.xsl
|
|
+++ b/rteval/rteval_text.xsl
|
|
@@ -342,7 +342,7 @@
|
|
</xsl:if>
|
|
|
|
<!-- If stoptrace_invoked is true, no Statistics are available -->
|
|
- <xsl:if test="stoptrace_invoked != true">
|
|
+ <xsl:if test="stoptrace_invoked != 'true'">
|
|
<xsl:text> Statistics: </xsl:text>
|
|
<xsl:apply-templates select="system/statistics"/>
|
|
</xsl:if>
|
|
--
|
|
2.47.1
|
|
|