Repository navigation
Tools: Testbench: Set default trace level to info - #9575
Conversation
d0db1a0 to
1e14666
Compare
There was a problem hiding this comment.
you already can use -d to set host_trace_level, seems not very logical to have 2 arguments directly affect the same parameter. Besides .quiet is also already used to set host_trace_level:
https://github.com/thesofproject/sof/blob/cbcd51f9ea4e8f5f6e59d9a6dfb6f60b5bc05d94/tools/testbench/testbench.c#L485-L488
and then
https://github.com/thesofproject/sof/blob/cbcd51f9ea4e8f5f6e59d9a6dfb6f60b5bc05d94/tools/testbench/utils.c#L228-L230
There was a problem hiding this comment.
Yep, true that it is confusing and there would be lottery if use both. Maybe I should set default trace level to info and drop -q option (need to be removed from some scripts).
There was a problem hiding this comment.
@lyakh Now the command line options should be consistent.
The test for trace level was wrong way, higher priority traces like errors have a lower number value. It caused non-controllable flood of debug traces. These changes help scripts to extract trace from stderr output with string "trace:" printed to begin of each line. The time and level information is made similar to normal trace output in devices. Example of printed trace: trace: [1728921012.720684] <inf> (eq_iir.c:55) eq_iir_init() Signed-off-by: Seppo Ingalsuo <[email protected]>
a0815d6 to
a6bb94d
Compare
The default testbench trace level debug consumes a lot of processing time due to large amount of prints. It also adds a lot to measured MCPS with xtensa build of testbench. The command line options -d and -q controlled the same host_trace_level that was confusing. Also the handling of option -d was wrong. As a fix the command -q is removed and -d is fixed to usable. The default trace level is LOG_LEVEL_INFO (3) that is applied if no option -d <level> is given. It is a suitable level for code profiling and performance measurement. The wrappers for testbench run comp_run.sh, tdfb_direction_test.m, and tdfb_test.m are updated due to the changes in testbench trace control. Signed-off-by: Seppo Ingalsuo <[email protected]>
The previously removed command line options are removed from help text print to avoid confusion. The functions tb_debug_print() and tb_check_trace() are used to reduce printing of less important messages those are still useful when debugging issues with components or testbench itself. Also tplg_debug() makes prints more clean looking with "debug:" prefix. Signed-off-by: Seppo Ingalsuo <[email protected]>
a6bb94d to
19780c7
Compare
This speeds up a lot scripts/host-testbench.sh execution that should also help CI workload. The xt-testbench shows with this comparable MCPS to a real device after not consuming most of performance to debug traces printing. The other patches also improve the testbench traces print format.