Tracing: Trace hook support macros
Adds generic trace hook macros for inserting trace hook for function entry, exit, blocking, and object initialization with a variable number of arguments (objects, return values, etc.). Utilizing macro concatenation these macros produce trace hooks of a similar format to the old trace system with SYS_TRACING_OBJ_FUNC(k_thread, switched_in) being turned into sys_trace_k_thread_switched_in() by the preprocessor. Although these macros still rely on the manual definition of each unique trace hook in tracing.h, the benefit of not directly calling those is that we can enable/disable trace hooks based on object type (k_thread, k_sem, etc.) through the preprocessor while providing the ability of adding type specific runtime trace processing similar to SYS_TRACING_OBJ_INIT. Signed-off-by:Torbjörn Leksell <torbjorn.leksell@percepio.com> Signed-off-by:
Anas Nashif <anas.nashif@intel.com>
Loading
Please sign in to comment