From d53c87a3caf1171ddfa3251c1d08feb44a0d5fcf Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Sun, 15 Sep 2019 23:05:11 -0400 Subject: [PATCH] doc: tracing: include API docs into documentation Group tracing documentation in header file and include them into documentation. Signed-off-by: Anas Nashif --- doc/guides/tracing/index.rst | 9 ++++++--- include/debug/tracing.h | 8 ++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/guides/tracing/index.rst b/doc/guides/tracing/index.rst index ea384852ae8..f685c21dad1 100644 --- a/doc/guides/tracing/index.rst +++ b/doc/guides/tracing/index.rst @@ -10,9 +10,12 @@ The tracing feature provides hooks that permits you to collect data from your application and allows enabled backends to visualize the inner-working of the kernel and various subsystems. -Applications and supported tools can define empty macros declared in -:zephyr_file:`include/tracing.h` that are called across the kernel in key spots. +Applications and tracing tools can create a backend that redefines the +macros declared in :zephyr_file:`include/debug/tracing.h` that are called +across the kernel in key spots. +.. doxygengroup:: tracing_apis + :project: Zephyr SEGGER SystemView Support ************************* @@ -23,7 +26,7 @@ any application for platforms that have the required hardware support. To enable tracing support with `SEGGER SystemView`_ add the configuration option :option:`CONFIG_SEGGER_SYSTEMVIEW` to your project configuration file and set it to *y*. For example, this can be added to the -:ref:`synchronization_sample` to visualize fast switching between threads: +:ref:`synchronization_sample` to visualize fast switching between threads:: CONFIG_STDOUT_CONSOLE=y # enable to use thread names diff --git a/include/debug/tracing.h b/include/debug/tracing.h index a7f6e1fa8fb..6c60110ad50 100644 --- a/include/debug/tracing.h +++ b/include/debug/tracing.h @@ -38,6 +38,11 @@ void z_sys_trace_thread_switched_out(void); #else +/** + * @brief Tracing APIs + * @defgroup tracing_apis Tracing APIs + * @{ + */ /** * @brief Called before a thread has been selected to run */ @@ -133,6 +138,9 @@ void z_sys_trace_thread_switched_out(void); #define z_sys_trace_thread_switched_in() #define z_sys_trace_thread_switched_out() +/** + * @} + */ #endif #endif