-
Notifications
You must be signed in to change notification settings - Fork 349
Logger add possibility to make logs output more compact #2905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you give before/after examples in the commit messages. Thanks.
|
@lgirdwood updated |
|
@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. |
|
@lgirdwood updated |
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ktrzcinx thank you, GH doesn't render it nicely but this should look fine with git
|
@ktrzcinx can you double check CI, it looks like the build has failed ? Seems unrelated to this ? |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: