tracing: add infrastructure for collection of tracing data

First, this commit adds user interface in tracing_format.h which
can trace both string format and data format packet.

Second, it adds method both for asynchronous and synchronous way.
For asynchronous method, tracing packet will be buffered in tracing
buffer first, tracing thread will output the stream data with the
help of tracing backend when tracing thread get scheduled.

Third, it adds UART and USB tracing backend for asynchronous
tracing method, and adds POSIX tracing backend for synchronous
tracing way.

Also it can receive command from host to dynamically enable and
disable tracing to have host capture tracing data conveniently.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
This commit is contained in:
Wentong Wu 2020-02-06 11:59:54 +08:00 committed by Anas Nashif
commit 8ccc04de6a
16 changed files with 1410 additions and 10 deletions

View file

@ -160,3 +160,10 @@
KEEP(*(SORT_BY_NAME("._cfb_font.*")))
__font_entry_end = .;
} GROUP_LINK_IN(ROMABLE_REGION)
SECTION_DATA_PROLOGUE(tracing_backends_sections,,)
{
_tracing_backend_list_start = .;
KEEP(*("._tracing_backend.*"));
_tracing_backend_list_end = .;
} GROUP_LINK_IN(ROMABLE_REGION)