DPDK  20.05.0
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
15 extern "C" {
16 #endif
17 
18 #include <rte_alarm.h>
19 #include <rte_interrupts.h>
20 #include <rte_trace_point.h>
21 
22 /* Generic */
24  rte_eal_trace_generic_void,
26 )
27 
29  rte_eal_trace_generic_u64,
30  RTE_TRACE_POINT_ARGS(uint64_t in),
32 )
33 
35  rte_eal_trace_generic_u32,
36  RTE_TRACE_POINT_ARGS(uint32_t in),
38 )
39 
41  rte_eal_trace_generic_u16,
42  RTE_TRACE_POINT_ARGS(uint16_t in),
44 )
45 
47  rte_eal_trace_generic_u8,
48  RTE_TRACE_POINT_ARGS(uint8_t in),
50 )
51 
53  rte_eal_trace_generic_i64,
54  RTE_TRACE_POINT_ARGS(int64_t in),
56 )
57 
59  rte_eal_trace_generic_i32,
60  RTE_TRACE_POINT_ARGS(int32_t in),
62 )
63 
65  rte_eal_trace_generic_i16,
66  RTE_TRACE_POINT_ARGS(int16_t in),
68 )
69 
71  rte_eal_trace_generic_i8,
72  RTE_TRACE_POINT_ARGS(int8_t in),
74 )
75 
77  rte_eal_trace_generic_int,
78  RTE_TRACE_POINT_ARGS(int in),
80 )
81 
83  rte_eal_trace_generic_long,
84  RTE_TRACE_POINT_ARGS(long in),
86 )
87 
89  rte_eal_trace_generic_float,
90  RTE_TRACE_POINT_ARGS(float in),
92 )
93 
95  rte_eal_trace_generic_double,
96  RTE_TRACE_POINT_ARGS(double in),
98 )
99 
101  rte_eal_trace_generic_ptr,
102  RTE_TRACE_POINT_ARGS(const void *ptr),
104 )
105 
107  rte_eal_trace_generic_str,
108  RTE_TRACE_POINT_ARGS(const char *str),
110 )
111 
113  rte_eal_trace_generic_func,
114  RTE_TRACE_POINT_ARGS(const char *func),
116 )
117 
118 #define RTE_EAL_TRACE_GENERIC_FUNC rte_eal_trace_generic_func(__func__)
119 
120 /* Alarm */
122  rte_eal_trace_alarm_set,
123  RTE_TRACE_POINT_ARGS(uint64_t us, rte_eal_alarm_callback cb_fn,
124  void *cb_arg, int rc),
127  rte_trace_point_emit_ptr(cb_arg);
129 )
130 
132  rte_eal_trace_alarm_cancel,
133  RTE_TRACE_POINT_ARGS(rte_eal_alarm_callback cb_fn, void *cb_arg,
134  int count),
136  rte_trace_point_emit_ptr(cb_arg);
138 )
139 
140 /* Memory */
142  rte_eal_trace_mem_zmalloc,
143  RTE_TRACE_POINT_ARGS(const char *type, size_t size, unsigned int align,
144  int socket, void *ptr),
148  rte_trace_point_emit_int(socket);
150 )
151 
153  rte_eal_trace_mem_malloc,
154  RTE_TRACE_POINT_ARGS(const char *type, size_t size, unsigned int align,
155  int socket, void *ptr),
159  rte_trace_point_emit_int(socket);
161 )
162 
164  rte_eal_trace_mem_realloc,
165  RTE_TRACE_POINT_ARGS(size_t size, unsigned int align, int socket,
166  void *ptr),
169  rte_trace_point_emit_int(socket);
171 )
172 
174  rte_eal_trace_mem_free,
175  RTE_TRACE_POINT_ARGS(void *ptr),
177 )
178 
179 /* Memzone */
181  rte_eal_trace_memzone_reserve,
182  RTE_TRACE_POINT_ARGS(const char *name, size_t len, int socket_id,
183  unsigned int flags, unsigned int align, unsigned int bound,
184  const void *mz),
187  rte_trace_point_emit_int(socket_id);
192 )
193 
195  rte_eal_trace_memzone_lookup,
196  RTE_TRACE_POINT_ARGS(const char *name, const void *memzone),
198  rte_trace_point_emit_ptr(memzone);
199 )
200 
202  rte_eal_trace_memzone_free,
203  RTE_TRACE_POINT_ARGS(const char *name, void *addr, int rc),
207 )
208 
209 /* Thread */
211  rte_eal_trace_thread_remote_launch,
212  RTE_TRACE_POINT_ARGS(int (*f)(void *), void *arg,
213  unsigned int slave_id, int rc),
216  rte_trace_point_emit_u32(slave_id);
218 )
220  rte_eal_trace_thread_lcore_ready,
221  RTE_TRACE_POINT_ARGS(unsigned int lcore_id, const char *cpuset),
222  rte_trace_point_emit_u32(lcore_id);
224 )
225 
226 /* Interrupt */
228  rte_eal_trace_intr_callback_register,
229  RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle,
230  rte_intr_callback_fn cb, void *cb_arg, int rc),
232  rte_trace_point_emit_int(handle->vfio_dev_fd);
233  rte_trace_point_emit_int(handle->fd);
234  rte_trace_point_emit_int(handle->type);
235  rte_trace_point_emit_u32(handle->max_intr);
236  rte_trace_point_emit_u32(handle->nb_efd);
238  rte_trace_point_emit_ptr(cb_arg);
239 )
241  rte_eal_trace_intr_callback_unregister,
242  RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle,
243  rte_intr_callback_fn cb, void *cb_arg, int rc),
245  rte_trace_point_emit_int(handle->vfio_dev_fd);
246  rte_trace_point_emit_int(handle->fd);
247  rte_trace_point_emit_int(handle->type);
248  rte_trace_point_emit_u32(handle->max_intr);
249  rte_trace_point_emit_u32(handle->nb_efd);
251  rte_trace_point_emit_ptr(cb_arg);
252 )
254  rte_eal_trace_intr_enable,
255  RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc),
257  rte_trace_point_emit_int(handle->vfio_dev_fd);
258  rte_trace_point_emit_int(handle->fd);
259  rte_trace_point_emit_int(handle->type);
260  rte_trace_point_emit_u32(handle->max_intr);
261  rte_trace_point_emit_u32(handle->nb_efd);
262 )
264  rte_eal_trace_intr_disable,
265  RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc),
267  rte_trace_point_emit_int(handle->vfio_dev_fd);
268  rte_trace_point_emit_int(handle->fd);
269  rte_trace_point_emit_int(handle->type);
270  rte_trace_point_emit_u32(handle->max_intr);
271  rte_trace_point_emit_u32(handle->nb_efd);
272 )
273 
274 #ifdef __cplusplus
275 }
276 #endif
277 
278 #endif /* _RTE_EAL_TRACE_H_ */
void(* rte_eal_alarm_callback)(void *arg)
Definition: rte_alarm.h:26
#define rte_trace_point_emit_u32(val)
#define rte_trace_point_emit_int(val)
#define RTE_TRACE_POINT_ARGS
#define rte_trace_point_emit_string(val)
#define RTE_TRACE_POINT(tp, args,...)
#define rte_trace_point_emit_i16(val)
#define rte_trace_point_emit_u8(val)
void(* rte_intr_callback_fn)(void *cb_arg)
#define rte_trace_point_emit_u16(val)
#define rte_trace_point_emit_i64(val)
#define rte_trace_point_emit_i8(val)
#define rte_trace_point_emit_float(val)
#define rte_trace_point_emit_ptr(val)
#define rte_trace_point_emit_double(val)
#define rte_trace_point_emit_i32(val)
#define rte_trace_point_emit_u64(val)
#define rte_trace_point_emit_long(val)