DPDK  21.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_size_t,
134  RTE_TRACE_POINT_ARGS(size_t sz),
136 )
137 
139  rte_eal_trace_generic_func,
140  RTE_TRACE_POINT_ARGS(const char *func),
142 )
143 
144 #define RTE_EAL_TRACE_GENERIC_FUNC rte_eal_trace_generic_func(__func__)
145 
146 /* Interrupt */
148  rte_eal_trace_intr_callback_register,
149  RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle,
150  rte_intr_callback_fn cb, void *cb_arg, int rc),
153  rte_trace_point_emit_int(handle->fd);
158  rte_trace_point_emit_ptr(cb_arg);
159 )
161  rte_eal_trace_intr_callback_unregister,
162  RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle,
163  rte_intr_callback_fn cb, void *cb_arg, int rc),
166  rte_trace_point_emit_int(handle->fd);
171  rte_trace_point_emit_ptr(cb_arg);
172 )
174  rte_eal_trace_intr_enable,
175  RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc),
178  rte_trace_point_emit_int(handle->fd);
182 )
184  rte_eal_trace_intr_disable,
185  RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc),
188  rte_trace_point_emit_int(handle->fd);
192 )
193 
194 /* Memory */
196  rte_eal_trace_mem_zmalloc,
197  RTE_TRACE_POINT_ARGS(const char *type, size_t size, unsigned int align,
198  int socket, void *ptr),
202  rte_trace_point_emit_int(socket);
204 )
205 
207  rte_eal_trace_mem_malloc,
208  RTE_TRACE_POINT_ARGS(const char *type, size_t size, unsigned int align,
209  int socket, void *ptr),
213  rte_trace_point_emit_int(socket);
215 )
216 
218  rte_eal_trace_mem_realloc,
219  RTE_TRACE_POINT_ARGS(size_t size, unsigned int align, int socket,
220  void *ptr),
223  rte_trace_point_emit_int(socket);
225 )
226 
228  rte_eal_trace_mem_free,
229  RTE_TRACE_POINT_ARGS(void *ptr),
231 )
232 
233 /* Memzone */
235  rte_eal_trace_memzone_reserve,
236  RTE_TRACE_POINT_ARGS(const char *name, size_t len, int socket_id,
237  unsigned int flags, unsigned int align, unsigned int bound,
238  const void *mz),
241  rte_trace_point_emit_int(socket_id);
246 )
247 
249  rte_eal_trace_memzone_lookup,
250  RTE_TRACE_POINT_ARGS(const char *name, const void *memzone),
252  rte_trace_point_emit_ptr(memzone);
253 )
254 
256  rte_eal_trace_memzone_free,
257  RTE_TRACE_POINT_ARGS(const char *name, void *addr, int rc),
261 )
262 
263 /* Thread */
265  rte_eal_trace_thread_remote_launch,
266  RTE_TRACE_POINT_ARGS(int (*f)(void *), void *arg,
267  unsigned int worker_id, int rc),
270  rte_trace_point_emit_u32(worker_id);
272 )
274  rte_eal_trace_thread_lcore_ready,
275  RTE_TRACE_POINT_ARGS(unsigned int lcore_id, const char *cpuset),
276  rte_trace_point_emit_u32(lcore_id);
278 )
279 
280 #ifdef __cplusplus
281 }
282 #endif
283 
284 #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)
enum rte_intr_handle_type type
#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)