DPDK  20.08.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 /* Alarm */
24  rte_eal_trace_alarm_set,
26  void *cb_arg, int rc),
31 )
32 
34  rte_eal_trace_alarm_cancel,
35  RTE_TRACE_POINT_ARGS(rte_eal_alarm_callback cb_fn, void *cb_arg,
36  int count),
40 )
41 
42 /* Generic */
44  rte_eal_trace_generic_void,
46 )
47 
49  rte_eal_trace_generic_u64,
50  RTE_TRACE_POINT_ARGS(uint64_t in),
52 )
53 
55  rte_eal_trace_generic_u32,
56  RTE_TRACE_POINT_ARGS(uint32_t in),
58 )
59 
61  rte_eal_trace_generic_u16,
62  RTE_TRACE_POINT_ARGS(uint16_t in),
64 )
65 
67  rte_eal_trace_generic_u8,
68  RTE_TRACE_POINT_ARGS(uint8_t in),
70 )
71 
73  rte_eal_trace_generic_i64,
74  RTE_TRACE_POINT_ARGS(int64_t in),
76 )
77 
79  rte_eal_trace_generic_i32,
80  RTE_TRACE_POINT_ARGS(int32_t in),
82 )
83 
85  rte_eal_trace_generic_i16,
86  RTE_TRACE_POINT_ARGS(int16_t in),
88 )
89 
91  rte_eal_trace_generic_i8,
92  RTE_TRACE_POINT_ARGS(int8_t in),
94 )
95 
97  rte_eal_trace_generic_int,
98  RTE_TRACE_POINT_ARGS(int in),
100 )
101 
103  rte_eal_trace_generic_long,
104  RTE_TRACE_POINT_ARGS(long in),
106 )
107 
109  rte_eal_trace_generic_float,
110  RTE_TRACE_POINT_ARGS(float in),
112 )
113 
115  rte_eal_trace_generic_double,
116  RTE_TRACE_POINT_ARGS(double in),
118 )
119 
121  rte_eal_trace_generic_ptr,
122  RTE_TRACE_POINT_ARGS(const void *ptr),
124 )
125 
127  rte_eal_trace_generic_str,
128  RTE_TRACE_POINT_ARGS(const char *str),
130 )
131 
133  rte_eal_trace_generic_func,
134  RTE_TRACE_POINT_ARGS(const char *func),
136 )
137 
138 #define RTE_EAL_TRACE_GENERIC_FUNC rte_eal_trace_generic_func(__func__)
139 
140 /* Interrupt */
142  rte_eal_trace_intr_callback_register,
143  RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle,
144  rte_intr_callback_fn cb, void *cb_arg, int rc),
146  rte_trace_point_emit_int(handle->vfio_dev_fd);
147  rte_trace_point_emit_int(handle->fd);
148  rte_trace_point_emit_int(handle->type);
149  rte_trace_point_emit_u32(handle->max_intr);
150  rte_trace_point_emit_u32(handle->nb_efd);
152  rte_trace_point_emit_ptr(cb_arg);
153 )
155  rte_eal_trace_intr_callback_unregister,
156  RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle,
157  rte_intr_callback_fn cb, void *cb_arg, int rc),
159  rte_trace_point_emit_int(handle->vfio_dev_fd);
160  rte_trace_point_emit_int(handle->fd);
161  rte_trace_point_emit_int(handle->type);
162  rte_trace_point_emit_u32(handle->max_intr);
163  rte_trace_point_emit_u32(handle->nb_efd);
165  rte_trace_point_emit_ptr(cb_arg);
166 )
168  rte_eal_trace_intr_enable,
169  RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc),
171  rte_trace_point_emit_int(handle->vfio_dev_fd);
172  rte_trace_point_emit_int(handle->fd);
173  rte_trace_point_emit_int(handle->type);
174  rte_trace_point_emit_u32(handle->max_intr);
175  rte_trace_point_emit_u32(handle->nb_efd);
176 )
178  rte_eal_trace_intr_disable,
179  RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc),
181  rte_trace_point_emit_int(handle->vfio_dev_fd);
182  rte_trace_point_emit_int(handle->fd);
183  rte_trace_point_emit_int(handle->type);
184  rte_trace_point_emit_u32(handle->max_intr);
185  rte_trace_point_emit_u32(handle->nb_efd);
186 )
187 
188 /* Memory */
190  rte_eal_trace_mem_zmalloc,
191  RTE_TRACE_POINT_ARGS(const char *type, size_t size, unsigned int align,
192  int socket, void *ptr),
196  rte_trace_point_emit_int(socket);
198 )
199 
201  rte_eal_trace_mem_malloc,
202  RTE_TRACE_POINT_ARGS(const char *type, size_t size, unsigned int align,
203  int socket, void *ptr),
207  rte_trace_point_emit_int(socket);
209 )
210 
212  rte_eal_trace_mem_realloc,
213  RTE_TRACE_POINT_ARGS(size_t size, unsigned int align, int socket,
214  void *ptr),
217  rte_trace_point_emit_int(socket);
219 )
220 
222  rte_eal_trace_mem_free,
223  RTE_TRACE_POINT_ARGS(void *ptr),
225 )
226 
227 /* Memzone */
229  rte_eal_trace_memzone_reserve,
230  RTE_TRACE_POINT_ARGS(const char *name, size_t len, int socket_id,
231  unsigned int flags, unsigned int align, unsigned int bound,
232  const void *mz),
235  rte_trace_point_emit_int(socket_id);
240 )
241 
243  rte_eal_trace_memzone_lookup,
244  RTE_TRACE_POINT_ARGS(const char *name, const void *memzone),
246  rte_trace_point_emit_ptr(memzone);
247 )
248 
250  rte_eal_trace_memzone_free,
251  RTE_TRACE_POINT_ARGS(const char *name, void *addr, int rc),
255 )
256 
257 /* Thread */
259  rte_eal_trace_thread_remote_launch,
260  RTE_TRACE_POINT_ARGS(int (*f)(void *), void *arg,
261  unsigned int slave_id, int rc),
264  rte_trace_point_emit_u32(slave_id);
266 )
268  rte_eal_trace_thread_lcore_ready,
269  RTE_TRACE_POINT_ARGS(unsigned int lcore_id, const char *cpuset),
270  rte_trace_point_emit_u32(lcore_id);
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_size_t(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)