Skip to content

Conversation

@ktrzcinx
Copy link
Member

@ktrzcinx ktrzcinx commented Mar 25, 2020

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

Output:

$./sof-logger -i log/dma_trace_1.bin -l log/sof-cnl.ldc -d
logger ABI Version is   4:2:0
ldc_file ABI Version is 4:2:0

Components uuid dictionary size:        824 bytes
Components uuid base address:           0x1FFFA000
Components uuid entries:
           ADDRESS                                    UUID NAME
        0x1FFFA000  <8b9d100c-6d78-418f-90a3-e0e805d0852b> host
        0x1FFFA01C  <f11818eb-e92e-4082-82a3-dc54c604ebb3> pipe-task
        0x1FFFA03C  <34dc0385-fc2f-4f7f-82d2-6cee444533e0> volume-task
        0x1FFFA05C  <b77e677e-5ff4-4188-af14-fba8bdbf8682> volume
        0x1FFFA078  <c1c5326d-8390-46b4-aa47-95c3beca6550> src
        0x1FFFA090  <43a90ce7-f3a5-41df-ac06-ba98651ae6a3> eq-fir
        0x1FFFA0AC  <5150c0e6-27f9-4ec8-8351-c705b642d12f> eq-iir
        0x1FFFA0C8  <04e3f894-2c5c-4f2e-8dc1-694eeaab53fa> tone
        0x1FFFA0E4  <bc06c037-12aa-417c-9a97-89282e321a76> mixer
        0x1FFFA100  <c4b26868-1430-470e-a089-15d1c77f851a> mux
        0x1FFFA118  <385cc44b-f34e-4b9b-8be0-535c5f43a825> switch
        0x1FFFA134  <c2b00d27-ffbc-4150-a51a-245c79c5e54b> dai
        0x1FFFA14C  <e50057a5-8b27-4db4-bd79-9a639cee5f50> kpb-task
        0x1FFFA16C  <d8218443-5ff3-4a4c-b388-6cfe07b9562e> kpb
        0x1FFFA184  <55a88ed5-3d18-46ca-88f1-0ee6eae9930f> selector
        0x1FFFA1A4  <eba8d51f-7827-47b5-82ee-de6e7743af67> kd-test
        0x1FFFA1C0  <c8ec72f6-8526-4faf-9d39-a23d0b541de2> asrc
        0x1FFFA1DC  <bc9ebe20-4577-41bb-9eed-d0cb236328da> hda-dai
        0x1FFFA1F8  <8fa1d42f-bc6f-464b-867f-547af08834da> ipc-task
        0x1FFFA218  <59c87728-d8f9-42f6-b89d-5870a87b0e1e> dmic-work
        0x1FFFA238  <aafc26fe-3b8d-498d-8bd6-248fc72efa31> dmic-dai
        0x1FFFA258  <31458125-95c4-4085-8f3f-497434cb2daf> ssp-dai
        0x1FFFA274  <a8e4218c-e863-4c93-84e7-5c27d2504501> alh-dai
        0x1FFFA290  <b90f5a4e-5537-4375-a1df-95485472ff9e> comp-task
        0x1FFFA2B0  <a5dacb0e-88dc-415c-a1b5-3e8df77f1976> idc-cmd-task
        0x1FFFA2D4  <c63c4e75-8f61-4420-9319-1395932efa9e> agent-work
        0x1FFFA2F4  <37f1d41f-252d-448d-b9c4-1e2bee8e1bf1> main-task
        0x1FFFA314  <2b972272-c5b1-4b7e-926f-0fc5cb4c4690> dma-trace-task
        -------------------------------------------------- cnt: 28

Double space in formatting string led to little mismatch between header
and content in output logger file.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Split this function to part responsible for pointer calculation
and string formatting. It make possibility to use same
string format with different pointer arithmetic.
Moreover introduce aprintf to make memory allocation for output
string more automated process.

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>
@ktrzcinx ktrzcinx requested review from jajanusz and lgirdwood March 25, 2020 13:46
@jajanusz
Copy link
Contributor

Most of checkpatch complains are caused by the fact that it does not know that *print functions are like trace functions. But this one complain is legit:

WARNING: line over 80 characters
#22: FILE: tools/logger/logger.c:45:
+	fprintf(stdout, "%s:\t -c clock\t\tSet timestamp clock in MHz\n", APP_NAME);

Cos it doesn't end with literal, there is symbol.

help message should explicity show that -c flags needs parameter.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
@ktrzcinx
Copy link
Member Author

@jajanusz fixed

@jajanusz jajanusz merged commit 7bf879b into thesofproject:master Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants