logger: new relative timestamps option, relative to first entry seen#3954
Closed
marc-hb wants to merge 2 commits intothesofproject:masterfrom
Closed
logger: new relative timestamps option, relative to first entry seen#3954marc-hb wants to merge 2 commits intothesofproject:masterfrom
marc-hb wants to merge 2 commits intothesofproject:masterfrom
Conversation
This is useful clue when forgetting to use "sudo" or to change permissions in udev. The messages changed are: - the first one printed when using -n, and - the first one printed when not using -n Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add a new sof-logger -e 0/1 relative timestamps option where the
TIMESTAMP column is relative to the first entry seen.
Removes many digits and makes the TIMESTAMP column much more readable in
short logs.
Also stop showing "NaN" as the first DELTA like something went
wrong. Show zero instead.
The new option is off by default when using -r(aw) and on otherwise.
The first entry is kept always absolute.
Before:
TIMESTAMP DELTA C# COMPONENT LOCATION CONTENT
[6653843012.343750] ( NaN) c0 dma-trace src/trace/dma-trace.c:339 ERROR FW ...
[6653843111.510417] ( 99.166664) c0 ll-schedule ./schedule/ll_schedule.c:229 perf ll_work
[6653843309.010417] ( 197.500000) c0 ll-schedule ./schedule/ll_schedule.c:399 task add
[6653843314.166667] ( 5.156250) c0 ll-schedule ./schedule/ll_schedule.c:403 task params
[6653843322.031250] ( 7.864583) c0 ll-schedule ./schedule/ll_schedule.c:309 new added
[6653843327.031250] ( 5.000000) c0 ll-schedule ./schedule/ll_schedule.c:312 num_tasks 2
[6653844109.531250] ( 782.500000) c0 sa src/lib/agent.c:65 perf sys_load
[6653844155.156250] ( 45.625000) c0 ll-schedule ./schedule/ll_schedule.c:229 perf ll_work
[6653844384.218750] ( 229.062500) c0 component src/audio/component.c:130 comp new host
After:
TIMESTAMP DELTA C# COMPONENT LOCATION CONTENT
[686125142.395834] ( 0.000000) c0 dma-trace src/trace/dma-trace.c:339 ERROR FW ...
[ 94.270833] ( 94.270836) c0 ll-schedule ./schedule/ll_schedule.c:229 perf ll_work
[ 296.770833] ( 202.500000) c0 ll-schedule ./schedule/ll_schedule.c:399 task add
[ 301.979167] ( 5.208333) c0 ll-schedule ./schedule/ll_schedule.c:403 task params
[ 309.843750] ( 7.864583) c0 ll-schedule ./schedule/ll_schedule.c:309 new added
[ 314.843750] ( 5.000000) c0 ll-schedule ./schedule/ll_schedule.c:312 num_tasks 2
[ 1092.395833] ( 777.552063) c0 sa src/lib/agent.c:65 perf sys_load
[ 1137.968750] ( 45.572918) c0 ll-schedule ./schedule/ll_schedule.c:229 perf ll_work
[ 1850.208333] ( 712.239563) c0 component src/audio/component.c:130 comp new host
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
dbaluta
reviewed
Mar 24, 2021
| fprintf(stderr, "error: Unable to open version file %s\n", | ||
| fprintf(stderr, | ||
| "error: Unable to open version file %s, check permissions\n", | ||
| config.version_file); |
Collaborator
There was a problem hiding this comment.
I think it is better to add strreror(errno). In my case most common problem is that I forget to add sof debugging support in linux so the debugfs file isn't even there.
Member
There was a problem hiding this comment.
ack, IIUC the strerror() also has language translations.
Collaborator
|
Please resubmit with "main" as PR base branch. |
Collaborator
Author
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.
2 commits. The only big and main one:
Add a new sof-logger -e 0/1 relative timestamps option where the
TIMESTAMP column is relative to the first entry seen.
Removes many digits and makes the TIMESTAMP column much more readable in
short logs.
Also stop showing "NaN" as the first DELTA like something went
wrong. Show zero instead.
The new option is off by default when using -r(aw) and on otherwise.
The first entry is kept always absolute.
Before:
After: