Skip to content

Commit 7daa1be

Browse files
committed
tools: sof_perf_analyzer: remove skip to first trace option
CI performance test is failing in recent daily build, this is due to timestamp are aligned between kernel and SOF, details are listed in below link. The firmware timestamp is in sync with the host side now, and becomes much more deterministic. The condition to use --skip-to-first-trace option in CI is eliminated (see the help info for the reason it is used in CI test). Based on this, skip-to-first-trace are not needed anymore, hence remove it from the script. Link: thesofproject/sof#8480 Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
1 parent a4d3f24 commit 7daa1be

2 files changed

Lines changed: 3 additions & 16 deletions

File tree

case-lib/lib.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -966,9 +966,9 @@ perf_analyze()
966966
dlogi "Checking SOF component performance"
967967
if [ -e "$LOG_ROOT/mtrace.txt" ]; then
968968
if [ -e "$LOG_ROOT/dmesg.txt" ]; then
969-
perf_cmd="sof_perf_analyzer.py --skip-to-first-trace --kmsg=$LOG_ROOT/dmesg.txt --out2html $LOG_ROOT/sof_perf.html $LOG_ROOT/mtrace.txt"
969+
perf_cmd="sof_perf_analyzer.py --kmsg=$LOG_ROOT/dmesg.txt --out2html $LOG_ROOT/sof_perf.html $LOG_ROOT/mtrace.txt"
970970
else
971-
perf_cmd="sof_perf_analyzer.py --skip-to-first-trace --out2html $LOG_ROOT/sof_perf.html $LOG_ROOT/mtrace.txt"
971+
perf_cmd="sof_perf_analyzer.py --out2html $LOG_ROOT/sof_perf.html $LOG_ROOT/mtrace.txt"
972972
fi
973973
dlogc "$perf_cmd"
974974
eval "$perf_cmd" || {

tools/sof_perf_analyzer.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,7 @@ def process_trace_file():
155155
ts_shift = 0
156156
with open(args.filename, 'r', encoding='utf8') as file:
157157
trace_item_gen = make_trace_item(file)
158-
trace_prev = None
159-
try:
160-
if args.skip_to_first_trace:
161-
trace_prev = skip_to_first_trace(trace_item_gen)
162-
else:
163-
trace_prev = next(trace_item_gen)
164-
except StopIteration as si:
165-
si.args = ('No valid trace in provided file',)
166-
raise
158+
trace_prev = next(trace_item_gen)
167159
for trace_curr in trace_item_gen:
168160
# pylint: disable=W0603
169161
old_ts_shift = ts_shift
@@ -279,11 +271,6 @@ def parse_args():
279271
help='Output SOF performance statistics to csv file')
280272
parser.add_argument('--out2html', type=pathlib.Path, required=False,
281273
help='Output SOF performance statistics to html file')
282-
parser.add_argument('-s', '--skip-to-first-trace', action="store_true", default=False,
283-
help='''In CI test, some traces from previous test case will appear in
284-
the mtrace of current test case, this flag is used to denote if we
285-
want to skip until the first line with a timestamp between 0 and 1s.
286-
For CI test, set the flag to True''')
287274

288275
return parser.parse_args()
289276

0 commit comments

Comments
 (0)