Commit Graph

101 Commits

Author SHA1 Message Date
Kai Vehmanen 1a7a36a84c sof-logger: ensure NULL string is not passed to printf/fprintf
Due to allocation failures, or invalid content in dictionary,
"params" entries in "struct proc_ldc_entry" may be NULL.

In print_entry_params(), the NULL entries may be passed
as arguments to fprintf(). While e.g. glibc handles these without
error, this is not guaranteed behaviour and may result in segfault
on some platforms.

Fix the issue by aborting program if allocation fails and
explicitly handling the cases when asprintf_entry_text returns
NULL.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-12-21 13:03:44 +00:00
Guennadi Liakhovetski 84b2dd2ae9 logger: check localtime() return value
localtime() can return NULL in error cases. Check the return value
before dereferencing it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-12-21 10:13:00 +00:00
Marc Herbert 2dfaee6a7d logger: convert.c: move global_config->logs_header to the heap
Finish the job that commit 5b29dae9c8 ("logger: Create global
convert_config variable to avoid spaghetti code.") started but did not
complete, leaving a confusing mix of globals and locals.

This confuses some static analyzer complaining that stack values are
being returned, see #6858 and #6738. This is a false positive because
convert's() stack lifespan is practically the same as a global but let's
simplify things anyway.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-12-21 09:36:27 +00:00
Marc Herbert 327a26bf8a logger: make "global_config" truly global
Finish the job that commit 5b29dae9c8 ("logger: Create global
convert_config variable to avoid spaghetti code.") started but did not
finish, leaving behind a supposedly "global" variable that is actually a
confusing global pointer to a struct local to the main() function.

This confuses some static analyzer complaining that stack values are
being returned, see #6858 and #6738. This is a false positive
because the main()'s stack lifespan is the same as a global but let's
simplify things anyway.

Also stop using 'extern' in .c files, use a proper .h file instead.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-12-21 09:36:27 +00:00
Kai Vehmanen 4bec5b292c logger: exit with error if calloc fails
In user-space tools, memory allocations can reasonably be expected to
always succeed. Make this assumption explicit by adding error handling
after calloc.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-12-20 11:47:01 +02:00
Marc Herbert 8e8d1060f5 logger: move "log_entry_address x not in dictionary range" to stderr
Make DMA trace corruption #5120 a bit more visible in the logs.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-25 20:46:32 +00:00
Marc Herbert 352ed2ca4b logger: when FW is loaded, show the expected checksum in -d output
Sample output:

logger ABI Version is   5:3:0
ldc_file ABI Version is 5:3:0
ldc_file src checksum           0x07d4f1ad
Loaded FW expects chksum        0x07d4f1ad       <=== NEW!

Components uuid dictionary size:        2400 bytes
Components uuid base address:           0x1fffa000
...

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-22 20:11:25 +00:00
Marc Herbert 4aaffbe9a2 logger: add dictionary checksum in output of dump_ldc option
Since commit 901f991eee ("logger: Validate by src_hash instead of abi
version from fw_ready") the dictionary checksum has become the most
important information.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-22 20:11:25 +00:00
Marc Herbert 9ce91cbf74 logger: rename verify_fw_ver() to verify_ldc_checksum(), fix -h help
Fixes commit 901f991eee ("logger: Validate by src_hash instead of abi
version from fw_ready") that changed the feature without updating the
name.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-22 20:11:25 +00:00
Jaska Uimonen f9cc0f7a1a logger: rename asprintf and vasprintf
Rename asprintf and vasprintf into log_asprintf and log_vasprintf as the
names could clash with the standard libc ones. These functions are there
originally done because of windows compatibility, but the naming was not
thought through carefully.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-12-02 09:56:25 +00:00
John Zimmermann 17d0e2d5ab logger: use more specific format specifiers
Signed-off-by: John Zimmermann <me@johnnynator.dev>
2021-11-11 13:24:33 +00:00
Marc Herbert 73df64444b logger: prefix and pad "task add 0xbe05ba30 <bad uid ptr 0x00000000>"
Before:
 WARN task add 0xbe05ba30 <bad uid ptr 0>

After:
 WARN task add 0xbe05ba30 <bad uid ptr 0x00000000>

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-06-10 15:50:21 +01:00
Marc Herbert 448bbc61a7 logger: print INFO and DEBUG prefixes, not just ERROR and WARN
It's not long and more consistent.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-06-10 15:50:21 +01:00
Marc Herbert ab643b7655 logger: catch out of bounds e->params[i] access
... when there are too many % characters in format string. Spotted by
routine valgrind run.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-06-10 15:50:21 +01:00
Marc Herbert d641558ef0 logger: print the value of a negative DELTA when there is one
Because why not.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-27 09:07:46 +01:00
Marc Herbert be7bed9ddf logger: don't "return" when failing in the main loop, break instead
Set the error code in "ret" and only exit the loop so we don't lose the
optional warnings at the end of the loop.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-27 09:07:46 +01:00
Marc Herbert a5b3c8e36b logger: increase time_fmt[] size to avoid a gcc warning.
gcc does not know that we already filtered unreasonable precision
values.

Increase the size of the temporary string from 32 bytes to 64
bytes. We're running on the host, memory is cheap.

Fixes commit d6f6a456c1 ("logger: fix column and header alignments")
For some reason CMake uses -Werror=format-truncation only in Release
mode.

Avoids the following warning:

```
sof/tools/logger/convert.c: In function ‘fetch_entry’:
sof/tools/logger/convert.c:514:27: error: ‘%d’ directive output may be
  truncated writing between 1 and 10 bytes into a region of size
  between 0 and 18 [-Werror=format-truncation=]

  514 |      "%%s[%%%d.%df] (%%%d.%df)%%s ",
      |                           ^~

sof/tools/logger/convert.c:514:6: note: directive argument in the
       range [0, 2147483647]
  514 |      "%%s[%%%d.%df] (%%%d.%df)%%s ",
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /usr/include/stdio.h:867,
                 from sof/tools/logger/convert.h:13,
                 from sof/tools/logger/convert.c:21:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10:

   note: ‘__builtin___snprintf_chk’ output between 21 and 59 bytes into
   a destination of size 32

   67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |      __bos (__s), __fmt, __va_arg_pack ());
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cc1: all warnings being treated as errors
```

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-24 15:27:18 -07:00
Marc Herbert 96f6a7b385 logger: add error messages when failing in the middle of fetch_entry()
Failing _in the middle of one log entry_ should really not be treated as
a normal event. The purpose of a logging tool is to find issues, not
hide them.

Don't abort on EOF because of valid use cases like device suspend but
don't do it quietly.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Marc Herbert e6f0f8b60f logger: add or fix error handling in read_entry_from_ldc_file()
Add a few missing log_err().

Remove calls to ferror() because:
- its return value is a meaningless "non-zero" boolean,
- we don't really care whether the dictionary file is in an error state
  or not; an unexpected end of dictionary file is just as bad.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Marc Herbert fb02c56649 logger: don't sound like the DMA trace can wrap
In general the DMA trace runs until interrupted but there are cases
where it can exit "normally": when reading from a file or stdin, when
some error happens,....

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Marc Herbert 1e64b7e83c logger: fix relative timestamp when re-opening the trace after EOF
Need to reset the (now global) entry number.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Marc Herbert 7dbcd7ee33 logger: add ktime and date in header
Every log file should have a date.

ktime can be related to the TIMESTAMP column. It is especially useful to
spot logs delayed or stuck.

Some logs use ktime while others use a date and it can be sometimes
difficult to connect them with one another. This header can help.

Before:

TIMESTAMP (us) DELTA C# COMPONENT CONTENT

[  5120116529] (  0) c0 dma-trace ERROR FW ABI 0x3012001 ...

After:

TIMESTAMP (us) DELTA C# COMPONENT \
                   CONTENT ktime=5132.663s @ 2021-04-27 14:36:09 -0700 PDT

[  5120116529] (  0) c0 dma-trace ERROR FW ABI 0x3012001 ...

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-29 12:09:10 +01:00
Marc Herbert 158089ceb6 Add and fix many logger and dma-related comments. No code change.
Learned the hard way.  Will help refactoring or duplicated
"reverse-engineering" effort.

Zero code change, pure comments: no functional change.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-28 15:52:44 +01:00
Marc Herbert d6f6a456c1 logger: fix column and header alignments
Increase default width from 10 to 12 to stop common misalignment,
especially in relative mode.

New timestamp_width() function to avoid duplication and
divergence.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-27 12:17:53 +01:00
Marc Herbert 37e87e54b1 logger: partial rewording of one log_err() and usage message
Cosmetic change that does not fit in any other commit.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-27 12:17:53 +01:00
Marc Herbert 1a79de1c16 logger: warn user about wrapped logs and skipped garbage
Don't sweep logging issues under the rug.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-23 13:32:17 +01:00
Marc Herbert d54a9281f8 logger: print a separator when the timestamp goes back in time
This makes the display of the mailbox ring buffer log much less
confusing. It should not happen with the DMA trace but will behave the
same in case something goes wrong.

Before this commit the only clue that wrapping had happened was a NaN in
the delta column (instead of the negative value).

The "other?" is because the start of the mailbox is sometimes corrupted,
or the timestamp goes sometimes back at boot for no obvious reason. In
other words this new separator is useful to highlight bugs too.

Absolute mode -e 0 with this commit:

    TIMESTAMP         DELTA C# COMPONENT          LOCATION

[22598174808] (        11) c0 ipc                  src/ipc/....
[22598174824] (        15) c0 ipc                  src/ipc/....
[22598443257] (    268433) c0 dma-trace             src/trace/....
[22598443271] (        14) c0 dma-trace             src/trace/....
[22598443286] (        14) c0 dma-trace             src/trace/....
[22598943257] (    499971) c0 dma-trace             src/trace/....

		 --- negative DELTA: wrap, IPC_TRACE, other? ---

[22430943257] (         0) c0 dma-trace             src/trace/....
[22530943257] ( 100000000) c0 dma-trace             src/trace/....
[22542943257] (  12000000) c0 dma-trace             src/trace/....
[22542943271] (        14) c0 dma-trace             src/trace/....
[22542943285] (        14) c0 dma-trace             src/trace/....

Relative mode -e 1 with this commit:

    TIMESTAMP         DELTA C# COMPONENT          LOCATION

[  3080783.6] (       11.4) c0 ipc                  src/ipc/....
[  3080799.1] (       15.5) c0 ipc                  src/ipc/....
[  3349232.5] (   268433.4) c0 dma-trace             src/trace/....
[  3349246.8] (       14.3) c0 dma-trace             src/trace/....
[  3349261.2] (       14.4) c0 dma-trace             src/trace/....
[  3849232.4] (   499971.2) c0 dma-trace             src/trace/....

		 --- negative DELTA: wrap, IPC_TRACE, other? ---

[22430943257.0] (      0.0) c0 dma-trace             src/trace/....
[100000000.0] (100000000.0) c0 dma-trace             src/trace/....
[111999999.5] ( 12000000.0) c0 dma-trace             src/trace/....
[112000013.9] (       14.4) c0 dma-trace             src/trace/....
[112000028.2] (       14.3) c0 dma-trace             src/trace/....

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-23 13:28:26 +01:00
Marc Herbert 53ce8b9d9f logger: new relative timestamps option, relative to first entry seen
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>
2021-04-02 13:35:48 +01:00
Daniel Baluta 101912b934 logger: Reduce one level of indentation
There is one extra level of identation for all the
code inside format_file_name function.

Remove that to enhance readability.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-01-05 17:23:26 +00:00
Artur Kloniecki 5d9ae0de93 logger: Decode %pQ format specifiers as log entries.
To allow proper display of suppressed message info traces, %pQ specifier
was chosen to decode pointers to log entries.
Helper function asprintf_entry_text() is used to handle the log entry
text for display.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
2020-11-27 15:10:46 +00:00
Karol Trzcinski 7f2767ca5e logger: Fix uuid formatting
'p + 2' should be smaller than end pointer, bigger value may leads
to undefined memory region read.
Memmove should include last '\0' char.
Without this fix output looks like:
  task add 0xbe070600 pipe-task 0x1fffa0f0U
After changes:
  task add 0xbe070600 pipe-task <f11818eb-e92e-4082-82a3-dc54c604ebb3>

Fixes: 12f2d9b2c8 logger: Refactor UUID parsing

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-10-02 11:30:37 +01:00
Karol Trzcinski e3b0aa7103 logger: Fix uuid_dict memory leak
config->uids_dict has never been freed before.
`out` label has been added to perform `uuid_dict`
free before function return.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-10-01 10:01:14 +01:00
Karol Trzcinski 5b0b1a3db5 logger: Skip %s from formatting string
Passing %s with random address leads to logger crash.
It's especially important right now, after changing
print formatter for UUID from %s to %pU. It's why
DBG_ABI patch number has been updated.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-10-01 10:01:14 +01:00
Karol Trzcinski 12f2d9b2c8 logger: Refactor UUID parsing
Split UUID formatter parsing from general formatter parser,
to make functions shorter and less complicated.
By the way reduce number of loops.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-10-01 10:01:14 +01:00
Karol Trzcinski 52e82f4c66 logger: Refactor fread() error check in logger_read()
fread() returns number of readed blocks, 0 when nothing read.
Comparison fread return value with "!ret" is quite misleading -
may suggests that negative value is returrned after fail.

Swapping if content makes flow easier, then first is error check,
and eventyally return statement, next try to reopen file.
It allows to check error condition only in one place, so there
won't be possibility to use different error checks in subsequent
stages (like ferror() and errno).

in_file alignment with trace entry size check has been added,
to warn about corrupted file.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-09-25 13:47:47 +01:00
Karol Trzcinski 1e26ff4dc7 logger: Use 'rb' mode for freopen
Windows platform needs "rb" mode to read binary file,
otherwise after read 0x1A EOF will be. See:
https://stackoverflow.com/questions/11717120/unexpected-return-value-from-fread

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-09-25 13:47:47 +01:00
Karol Trzcinski adc447e8e4 logger: Check fprintf return value for trace format text
log format text comes from ldc file (may be invalid),
so error check is needed. Don't treat it as fatal error,
because this error may not impact following logs, when
formatting text is root cause of the issue.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-09-25 13:47:47 +01:00
Karol Trzcinski 5eb9c49258 logger: Log fread error only when it happened
fread may return 0 when some error occurred or nothig has been reded.
Moreover errno may not be set on Windows plaform, use ferror
instead. See:
https://www.gnu.org/software/gnulib/manual/html_node/fread.html

Fixes: 337afc4f3809: ("logger: add error message when reading sof/etrace instead of sof/trace")

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-09-25 13:47:47 +01:00
Marc Herbert 1240a8bea3 logger: stop ignoring return value of ‘freopen’
Reported by VERBOSE=1 CMAKE_BUILD_TYPE=Release ./scripts/build-tools.sh -l
and gcc version 9.3.0-10ubuntu2:

 tools/logger/convert.c:630:5: error: ignoring return value of ‘freopen’,
   declared with attribute warn_unused_result [-Werror=unused-result]

Tested with sof-test/test-case/check-suspend-resume-with-audio.sh

Fixes commit 6a84b4e945 ("sof: logger: reopen trace file upon EOF")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-09-15 10:03:04 +01:00
Marc Herbert 7d2cb097c2 logger: fix potential time_fmt truncation in print_entry_params()
As reported by gcc 9.3.0-10ubuntu2 and
 VERBOSE=1 CMAKE_BUILD_TYPE=Release ./scripts/build-tools.sh -l

  ‘__builtin___snprintf_chk’ output between 23 and 57 bytes
   into a time_fmt destination of size 32

Fixes commit d7b535e282 ("logger: Add option to set timestamp
precision")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-09-15 10:03:04 +01:00
Marc Herbert 337afc4f38 logger: add error message when reading sof/etrace instead of sof/trace
Failing silently is not nice. Now prints instead:

  TIMESTAMP   DELTA C# COMPONENT   LOCATION   CONTENT
  error: in logger_read(), fread(..., /sys/kernel/debug/sof/etrace) \
    failed: Invalid argument(22)

Also make logger_read() and the process return [-]errno which can have
different values and some information instead of -ferror() which has
only one value (non-zero in theory, 1 in practice) hence no information.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-09-14 10:43:54 +01:00
Artur Kloniecki 79be1ce827 logger: Extract reading entry from ldc file to separate function.
In case we ever needed to load the entry from ldc file, without params
processing and printing.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
2020-09-08 12:40:08 +02:00
Guennadi Liakhovetski 03f4a1704e logger: support kernel-style UUID formats
Implement "%pUb", "%pUB", "%pUl", and "%pUL" UUID formats.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-09-02 14:13:15 +01:00
Artur Kloniecki 5b29dae9c8 logger: Create global convert_config variable to avoid spaghetti code.
Most functions in logger depend on values stored in conver_config struct
which are passed to almost all function calls. This patch moves pointer
to the config to global context and allows each function to derive
necessary values from there. This reduces needless parameters passed
to function calls and allows for more flexible access to data in nested
functions.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
2020-09-01 10:11:55 +01:00
Karol Trzcinski b1fc922079 logger: Parse runtime filter levels
Parse arguments given in -F flag, in form where each -F argument
is given as separate line. Format of single -F entry is
`<log_level>=<component_list>`. <log_level> must corresponds with
.name field from log_level_dict. List of component are build from
elements separated with `,` and single element may have one of the
following forms:
"<name> <pipe_id>.<comp_id>" - single component instance
"<name> <pipe_id>.*" - components with given name on piepeline with pipe_id
"<name>*" - each component instance with given name or global component
"<name>" - as above
"* <pipe_id>.<comp_id>" - component on selected pipe_id with given comp_id
"* <pipe_id>.*" - each component on pipeline with pipe_id
"*" - each component in firmware
<name> must correspond values of uuid entries from ldc file.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-08-25 13:09:38 +01:00
Karol Trzcinski 4db4d0d86f logger: Exclude misc functions from convert file
A few, general usage functions where implemented in converter file.
They should be moved to separate file, to make it easily accessible
form any source file. Moreover removing it from converter file, is a
part of this file cleanup.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-08-25 13:09:38 +01:00
Karol Trzcinski 7e7829d26f logger: Extract function for conversion between UUID value and UUID key
This conversion should be done in function, because of future usage
in different places, outside converter.c file.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-08-25 13:09:38 +01:00
Karol Trzcinski 901f991eee logger: Validate by src_hash instead of abi version from fw_ready
ABI version saved in fw_ready doesn't match with DBG_ABI version
saved in ldc file even for proper pair of fw and ldc file.
Moreover ldc file content changes at any log modyfication, what
is not related with DBG_ABI change, so this way of solving this
problem is incorrect.
Introduced src_hash value change solves both problems.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-08-18 10:35:29 +01:00
Karol Trzcinski adc8cc22cc sof: Unify hex dixplay style
Consistency should be kept so usage the same HEX case throughout the FW
is advised.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-07-07 15:48:43 +01:00
Karol Trzcinski cb10221109 logger: Rename float_precision to time_precision
New name better describes variable functionality.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-06-24 09:30:26 +01:00