Uh oh!
There was an error while loading. Please reload this page.
Logger add possibility to make logs output more compact - #2905
Conversation
lgirdwood
left a comment
There was a problem hiding this comment.
Can you give before/after examples in the commit messages. Thanks.
ktrzcinx
commented
May 8, 2020
@lgirdwood updated |
lgirdwood
commented
May 8, 2020
@ktrzcinx the updates look good, but I mean paste the before/after into the commit message not the PR message. This way it's obvious for anyone reading the git logs as the current messages are vague. |
ktrzcinx
commented
May 8, 2020
@lgirdwood updated |
Uh oh!
There was an error while loading. Please reload this page.
It allows to make logs output more compact, it change: $ ./sof-logger -l sof-cnl.ldc -i dma_trace_1.bin TIMESTAMP DELTA C# COMPONENT LOCATION CONTENT [ 497588.489583] ( 497588.500000) c0 DMA .../intel/cavs/hda-dma.c:407 hda-dmac: 4 channel 6 -> get to: $ ./sof-logger -l sof-cnl.ldc -i dma_trace_1.bin -L TIMESTAMP DELTA C# COMPONENT CONTENT [ 497588.489583] ( 497588.500000) c0 DMA hda-dmac: 4 channel 6 -> get Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Shorten timestamp makes logger output more compact, it change: $ ./sof-logger -l sof-cnl.ldc -i dma_trace_1.bin TIMESTAMP DELTA C# COMPONENT LOCATION CONTENT [ 497588.489583] ( 497588.500000) c0 DMA .../intel/cavs/hda-dma.c:407 hda-dmac: 4 channel 6 -> get to: $ sof-logger -l sof-cnl.ldc -i dma_trace_1.bin -f0 TIMESTAMP DELTA C# COMPONENT LOCATION CONTENT [ 497588] ( 497588) c0 DMA .../intel/cavs/hda-dma.c:407 hda-dmac: 4 channel 6 -> get Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
lgirdwood
commented
May 13, 2020
@ktrzcinx can you double check CI, it looks like the build has failed ? Seems unrelated to this ? |
ktrzcinx
commented
May 13, 2020
and So nothing related with logger, especially when I added functionality is disabled in CI tests (need to pass extra flags) |
| snprintf(time_fmt, sizeof(time_fmt), | ||
| "%%s[%%%d.%df] (%%%d.%df)%%s ", | ||
| float_precision + 10, float_precision, | ||
| float_precision + 10, float_precision); |
There was a problem hiding this comment.
With a crazy long precision snprintf can truncate time_fmt. Reported by gcc 9.3 -Werr and fixed in PR 3411#3412 sorry
Add option to set timestamp precision and second one to cutout trace location
Original output:
With flag -L:
With flag -L -f0: