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>
To parse filter configuration given by user, uuid dictionary
must be readed first from ldc file. Otherwise it's impossible
to validate given components names. This is reason why filter
configuration must be buffered and parsed in later steps.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
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>
rimage will not be responsible for ldc file creation so logger
should points valid tool.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Create dump options for logger to print important information from
LDC file, like DBG_ABI version and UUID with corresponding names.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Log entry format is scanned by the logger and if %s is found,
then corresponding parameter is interpreted as address
of static uuid entry. The original address is replaced by
formatted uuid namen and value, painted in blue, before
fprintf() is called.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Log entry parameters format is compacted to reserve more
space for the text.
Max entry location length is increased to 24 characters.
Timestamp and component name/id use colors to improve
readability.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Content of static uuid section is appended to the ldc file
along with a new special header by rimage.
New ldc file part is read by the logger to decode
uuid pointers provided in traces into nice names.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
These traces shouldn't be duplicated, they should be in
more public header because they are used outside of FW.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Some of interface headers are not needed by kernel,
but are needed by user-space applications, so we can split them
into multiple directories that indicate their purpose.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Activated by '-r' option. Useful for intermediate log
processing when the output is used as an input for another
tool. No headers, tokens separated by single spaces,
component ids concatenated with component name to
still produce a single token if present.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
On some systems the DSP has no DMA interface to the host and is
using a serial port for sending its trace. This patch adds a "-u"
argument to specify a baudrate, that should be used with the serial
interface. The implementation takes care of spurious bytes,
sometimes seen in the beginning of the trace, produced by the port
initialisation by the DSP. The format is fixed to 8N1.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1. Programs shouldn't exit with negative return values, strictly
speaking only EXIT_SUCCESS and EXIT_FAILURE should be used,
however it is also valid to return 0 for success and any number
from 1 to 125 for a failure.
2. Avoid passing complete structs as function parameters where an
additional copy of one isn't needed, use const pointers instead.
3. Remove a left-over unused argument.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>