tracing: add TRACING_TEST Kconfig option
Add Kconfig option TRACING_TEST which can be used to customize tracing packet format (currently supporting string format and data format) for testing purpose. Signed-off-by: Wentong Wu <wentong.wu@intel.com>
This commit is contained in:
parent
aa5d45d7cc
commit
4f4b8ef4ea
3 changed files with 49 additions and 0 deletions
|
@ -27,6 +27,9 @@
|
|||
#elif defined CONFIG_TRACING_CTF
|
||||
#include "tracing_ctf.h"
|
||||
|
||||
#elif defined CONFIG_TRACING_TEST
|
||||
#include "tracing_test.h"
|
||||
|
||||
#else
|
||||
|
||||
/**
|
||||
|
|
|
@ -448,6 +448,13 @@ config TRACING_CTF_TIMESTAMP
|
|||
Timestamp prefix will be added to the beginning of CTF
|
||||
event internally.
|
||||
|
||||
config TRACING_TEST
|
||||
bool "Tracing for test usage"
|
||||
depends on TRACING
|
||||
help
|
||||
Enable tracing for testing kinds of format purpose. It must
|
||||
implement the tracing hooks defined in tracing_test.h
|
||||
|
||||
|
||||
source "subsys/debug/Kconfig.segger"
|
||||
|
||||
|
|
39
subsys/debug/tracing/include/tracing_test.h
Normal file
39
subsys/debug/tracing/include/tracing_test.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef _TRACE_TEST_H
|
||||
#define _TRACE_TEST_H
|
||||
|
||||
#include <kernel.h>
|
||||
#include <kernel_structs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void sys_trace_thread_switched_out(void);
|
||||
void sys_trace_thread_switched_in(void);
|
||||
void sys_trace_thread_priority_set(struct k_thread *thread);
|
||||
void sys_trace_thread_create(struct k_thread *thread);
|
||||
void sys_trace_thread_abort(struct k_thread *thread);
|
||||
void sys_trace_thread_suspend(struct k_thread *thread);
|
||||
void sys_trace_thread_resume(struct k_thread *thread);
|
||||
void sys_trace_thread_ready(struct k_thread *thread);
|
||||
void sys_trace_thread_pend(struct k_thread *thread);
|
||||
void sys_trace_thread_info(struct k_thread *thread);
|
||||
void sys_trace_thread_name_set(struct k_thread *thread);
|
||||
void sys_trace_isr_enter(void);
|
||||
void sys_trace_isr_exit(void);
|
||||
void sys_trace_isr_exit_to_scheduler(void);
|
||||
void sys_trace_idle(void);
|
||||
void sys_trace_void(unsigned int id);
|
||||
void sys_trace_end_call(unsigned int id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue