DPDK 22.11.7
rte_eal_trace.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2020 Marvell International Ltd.
3 */
4
5#ifndef _RTE_EAL_TRACE_H_
6#define _RTE_EAL_TRACE_H_
7
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#include <rte_alarm.h>
19#include <rte_interrupts.h>
20#include <rte_trace_point.h>
21
22#include "eal_interrupts.h"
23
24/* Alarm */
26 rte_eal_trace_alarm_set,
28 void *cb_arg, int rc),
33)
34
36 rte_eal_trace_alarm_cancel,
38 int count),
42)
43
44/* Generic */
46 rte_eal_trace_generic_void,
48)
49
51 rte_eal_trace_generic_u64,
52 RTE_TRACE_POINT_ARGS(uint64_t in),
54)
55
57 rte_eal_trace_generic_u32,
58 RTE_TRACE_POINT_ARGS(uint32_t in),
60)
61
63 rte_eal_trace_generic_u16,
64 RTE_TRACE_POINT_ARGS(uint16_t in),
66)
67
69 rte_eal_trace_generic_u8,
70 RTE_TRACE_POINT_ARGS(uint8_t in),
72)
73
75 rte_eal_trace_generic_i64,
76 RTE_TRACE_POINT_ARGS(int64_t in),
78)
79
81 rte_eal_trace_generic_i32,
82 RTE_TRACE_POINT_ARGS(int32_t in),
84)
85
87 rte_eal_trace_generic_i16,
88 RTE_TRACE_POINT_ARGS(int16_t in),
90)
91
93 rte_eal_trace_generic_i8,
94 RTE_TRACE_POINT_ARGS(int8_t in),
96)
97
99 rte_eal_trace_generic_int,
100 RTE_TRACE_POINT_ARGS(int in),
102)
103
105 rte_eal_trace_generic_long,
106 RTE_TRACE_POINT_ARGS(long in),
108)
109
111 rte_eal_trace_generic_float,
112 RTE_TRACE_POINT_ARGS(float in),
114)
115
117 rte_eal_trace_generic_double,
118 RTE_TRACE_POINT_ARGS(double in),
120)
121
123 rte_eal_trace_generic_ptr,
124 RTE_TRACE_POINT_ARGS(const void *ptr),
126)
127
129 rte_eal_trace_generic_str,
130 RTE_TRACE_POINT_ARGS(const char *str),
132)
133
135 rte_eal_trace_generic_size_t,
136 RTE_TRACE_POINT_ARGS(size_t sz),
138)
139
141 rte_eal_trace_generic_func,
142 RTE_TRACE_POINT_ARGS(const char *func),
144)
145
146#define RTE_EAL_TRACE_GENERIC_FUNC rte_eal_trace_generic_func(__func__)
147
148/* Interrupt */
150 rte_eal_trace_intr_callback_register,
151 RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle,
152 rte_intr_callback_fn cb, void *cb_arg, int rc),
154 rte_trace_point_emit_int(handle->dev_fd);
155 rte_trace_point_emit_int(handle->fd);
156 rte_trace_point_emit_int(handle->type);
157 rte_trace_point_emit_u32(handle->max_intr);
158 rte_trace_point_emit_u32(handle->nb_efd);
161)
163 rte_eal_trace_intr_callback_unregister,
164 RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle,
165 rte_intr_callback_fn cb, void *cb_arg, int rc),
167 rte_trace_point_emit_int(handle->dev_fd);
168 rte_trace_point_emit_int(handle->fd);
169 rte_trace_point_emit_int(handle->type);
170 rte_trace_point_emit_u32(handle->max_intr);
171 rte_trace_point_emit_u32(handle->nb_efd);
174)
176 rte_eal_trace_intr_enable,
177 RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc),
179 rte_trace_point_emit_int(handle->dev_fd);
180 rte_trace_point_emit_int(handle->fd);
181 rte_trace_point_emit_int(handle->type);
182 rte_trace_point_emit_u32(handle->max_intr);
183 rte_trace_point_emit_u32(handle->nb_efd);
184)
186 rte_eal_trace_intr_disable,
187 RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc),
189 rte_trace_point_emit_int(handle->dev_fd);
190 rte_trace_point_emit_int(handle->fd);
191 rte_trace_point_emit_int(handle->type);
192 rte_trace_point_emit_u32(handle->max_intr);
193 rte_trace_point_emit_u32(handle->nb_efd);
194)
195
196/* Memory */
198 rte_eal_trace_mem_zmalloc,
199 RTE_TRACE_POINT_ARGS(const char *type, size_t size, unsigned int align,
200 int socket, void *ptr),
206)
207
209 rte_eal_trace_mem_malloc,
210 RTE_TRACE_POINT_ARGS(const char *type, size_t size, unsigned int align,
211 int socket, void *ptr),
217)
218
220 rte_eal_trace_mem_realloc,
221 RTE_TRACE_POINT_ARGS(size_t size, unsigned int align, int socket,
222 void *ptr),
227)
228
230 rte_eal_trace_mem_free,
231 RTE_TRACE_POINT_ARGS(void *ptr),
233)
234
235/* Memzone */
237 rte_eal_trace_memzone_reserve,
238 RTE_TRACE_POINT_ARGS(const char *name, size_t len, int socket_id,
239 unsigned int flags, unsigned int align, unsigned int bound,
240 const void *mz),
243 rte_trace_point_emit_int(socket_id);
248)
249
251 rte_eal_trace_memzone_lookup,
252 RTE_TRACE_POINT_ARGS(const char *name, const void *memzone),
255)
256
258 rte_eal_trace_memzone_free,
259 RTE_TRACE_POINT_ARGS(const char *name, void *addr, int rc),
263)
264
265/* Thread */
267 rte_eal_trace_thread_remote_launch,
268 RTE_TRACE_POINT_ARGS(int (*f)(void *), void *arg,
269 unsigned int worker_id, int rc),
272 rte_trace_point_emit_u32(worker_id);
274)
276 rte_eal_trace_thread_lcore_ready,
277 RTE_TRACE_POINT_ARGS(unsigned int lcore_id, const char *cpuset),
278 rte_trace_point_emit_u32(lcore_id);
280)
281
282#ifdef __cplusplus
283}
284#endif
285
286#endif /* _RTE_EAL_TRACE_H_ */
void(* rte_eal_alarm_callback)(void *arg)
Definition: rte_alarm.h:26
void(* rte_intr_callback_fn)(void *cb_arg)
#define rte_trace_point_emit_u32(val)
#define rte_trace_point_emit_i32(val)
#define rte_trace_point_emit_u8(val)
#define rte_trace_point_emit_u16(val)
#define rte_trace_point_emit_i8(val)
#define rte_trace_point_emit_i16(val)
#define RTE_TRACE_POINT_ARGS
#define rte_trace_point_emit_int(val)
#define rte_trace_point_emit_ptr(val)
#define rte_trace_point_emit_double(val)
#define rte_trace_point_emit_u64(val)
#define rte_trace_point_emit_size_t(val)
#define rte_trace_point_emit_i64(val)
#define rte_trace_point_emit_string(val)
#define rte_trace_point_emit_float(val)
#define RTE_TRACE_POINT(tp, args,...)
#define rte_trace_point_emit_long(val)