Tools: Testbench: Set default trace level to info#9575
Merged
kv2019i merged 3 commits intothesofproject:mainfrom Oct 17, 2024
Merged
Tools: Testbench: Set default trace level to info#9575kv2019i merged 3 commits intothesofproject:mainfrom
kv2019i merged 3 commits intothesofproject:mainfrom
Conversation
singalsu
commented
Oct 14, 2024
d0db1a0 to
1e14666
Compare
lgirdwood
approved these changes
Oct 15, 2024
lyakh
requested changes
Oct 16, 2024
tools/testbench/testbench.c
Outdated
| if (tp->quiet) | ||
| host_trace_level = LOG_LEVEL_INFO; | ||
| else | ||
| host_trace_level = LOG_LEVEL_DEBUG; |
Collaborator
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:
sof/tools/testbench/testbench.c
Lines 485 to 488 in cbcd51f
and then
Lines 228 to 230 in cbcd51f
Collaborator
Author
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).
Collaborator
Author
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 <seppo.ingalsuo@linux.intel.com>
a0815d6 to
a6bb94d
Compare
singalsu
commented
Oct 16, 2024
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 <seppo.ingalsuo@linux.intel.com>
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 <seppo.ingalsuo@linux.intel.com>
a6bb94d to
19780c7
Compare
lyakh
approved these changes
Oct 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.