Skip to content

Commit

Permalink
tools: sof_perf_analyzer: remove skip to first trace option
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
btian1 committed Jan 10, 2024
1 parent a4d3f24 commit 045f844
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
4 changes: 2 additions & 2 deletions case-lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -966,9 +966,9 @@ perf_analyze()
dlogi "Checking SOF component performance"
if [ -e "$LOG_ROOT/mtrace.txt" ]; then
if [ -e "$LOG_ROOT/dmesg.txt" ]; then
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"
perf_cmd="sof_perf_analyzer.py --kmsg=$LOG_ROOT/dmesg.txt --out2html $LOG_ROOT/sof_perf.html $LOG_ROOT/mtrace.txt"
else
perf_cmd="sof_perf_analyzer.py --skip-to-first-trace --out2html $LOG_ROOT/sof_perf.html $LOG_ROOT/mtrace.txt"
perf_cmd="sof_perf_analyzer.py --out2html $LOG_ROOT/sof_perf.html $LOG_ROOT/mtrace.txt"
fi
dlogc "$perf_cmd"
eval "$perf_cmd" || {
Expand Down
15 changes: 1 addition & 14 deletions tools/sof_perf_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,7 @@ def process_trace_file():
ts_shift = 0
with open(args.filename, 'r', encoding='utf8') as file:
trace_item_gen = make_trace_item(file)
trace_prev = None
try:
if args.skip_to_first_trace:
trace_prev = skip_to_first_trace(trace_item_gen)
else:
trace_prev = next(trace_item_gen)
except StopIteration as si:
si.args = ('No valid trace in provided file',)
raise
trace_prev = next(trace_item_gen)
for trace_curr in trace_item_gen:
# pylint: disable=W0603
old_ts_shift = ts_shift
Expand Down Expand Up @@ -279,11 +271,6 @@ def parse_args():
help='Output SOF performance statistics to csv file')
parser.add_argument('--out2html', type=pathlib.Path, required=False,
help='Output SOF performance statistics to html file')
parser.add_argument('-s', '--skip-to-first-trace', action="store_true", default=False,
help='''In CI test, some traces from previous test case will appear in
the mtrace of current test case, this flag is used to denote if we
want to skip until the first line with a timestamp between 0 and 1s.
For CI test, set the flag to True''')

return parser.parse_args()

Expand Down

0 comments on commit 045f844

Please sign in to comment.