Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
tracing.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
13
14#ifndef ZEPHYR_INCLUDE_TRACING_TRACING_H_
15#define ZEPHYR_INCLUDE_TRACING_TRACING_H_
16
17#include "tracking.h"
18
19#if defined CONFIG_SEGGER_SYSTEMVIEW
20#include "tracing_sysview.h"
21#elif defined CONFIG_TRACING_CTF
22#include "tracing_ctf.h"
23#elif defined CONFIG_TRACING_TEST
24#include "tracing_test.h"
25#elif defined CONFIG_TRACING_USER
26#include "tracing_user.h"
27#elif defined CONFIG_TRACING_CUSTOM
28#include "zephyr_custom_tracing.h"
29/*
30 * Fill any hook the custom header did not define with a canonical no-op. The
31 * per-macro #ifndef guards in tracing_hooks.h make the custom header's own
32 * definitions win; only gaps are filled.
33 */
34#include "tracing_hooks.h"
35#elif defined(CONFIG_TRACING_FORMAT_HEADER)
36/*
37 * Out-of-tree / module-provided tracing format. The module sets
38 * CONFIG_TRACING_FORMAT_HEADER (a Kconfig string) to the name of its hook header,
39 * which is pulled in here with a computed #include - no edits to this file are
40 * required. Reached only when no in-tree format above is selected.
41 */
42#include CONFIG_TRACING_FORMAT_HEADER
43/*
44 * Backfill canonical no-ops for any hook the format header did not define. The
45 * #ifndef guards keep the format's own definitions; only gaps are filled. (A
46 * format header that itself pulls in <kernel.h> before defining its hooks should
47 * also include tracing_hooks.h at its own end, as the in-tree headers do; the
48 * include guard makes this second include harmless.)
49 */
50#include "tracing_hooks.h"
51#else
62
72
73
74/*
75 * The full set of sys_port_trace_* hook macros. Kept in a dedicated header so it
76 * is the single source of truth, shared with every backend (see below).
77 */
78#include "tracing_hooks.h"
79
80
81#if defined(CONFIG_PERCEPIO_TRACERECORDER)
82#include "tracing_tracerecorder.h"
83
87void sys_trace_idle_exit(void);
88
89#else
94
99
104
108void sys_trace_idle(void);
109
114
115#endif /* CONFIG_PERCEPIO_TRACERECORDER */
116
120#define sys_trace_sys_init_enter(entry, level)
121
125#define sys_trace_sys_init_exit(entry, level, result)
126
132
141#define sys_trace_named_event(name, arg0, arg1)
142 /* end of subsys_tracing_apis_named */
144 /* end of subsys_tracing_apis */
146 /* end of subsys_tracing */
148
149#endif
150
151#endif /* ZEPHYR_INCLUDE_TRACING_TRACING_H_ */
void sys_trace_isr_exit_to_scheduler(void)
Called when exiting an ISR and switching to scheduler.
void sys_trace_isr_enter(void)
Called when entering an ISR.
void sys_trace_isr_exit(void)
Called when exiting an ISR.
void sys_trace_idle_exit(void)
Called when the cpu exits the idle state.
void sys_trace_idle(void)
Called when the cpu enters the idle state.
Canonical tracing hook list.
Header file for object tracking API.