|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __perfmon_perfmon_h
17 #define __perfmon_perfmon_h
19 #include <linux/perf_event.h>
26 #define PERF_MAX_EVENTS 8
76 #define foreach_permon_offset_type \
77 _ (PERFMON_OFFSET_TYPE_MMAP, perfmon_dispatch_wrapper_mmap) \
78 _ (PERFMON_OFFSET_TYPE_METRICS, perfmon_dispatch_wrapper_metrics)
193 for (
int i = 0;
i <
b->n_cpu_supports; ++
i)
194 if (supports[
i].cpu_supports ())
200 #define PERFMON_REGISTER_SOURCE(x) \
201 perfmon_source_t __perfmon_source_##x; \
202 static void __clib_constructor __perfmon_source_registration_##x (void) \
204 perfmon_main_t *pm = &perfmon_main; \
205 __perfmon_source_##x.next = pm->sources; \
206 pm->sources = &__perfmon_source_##x; \
208 perfmon_source_t __perfmon_source_##x
210 #define PERFMON_REGISTER_BUNDLE(x) \
211 perfmon_bundle_t __perfmon_bundle_##x; \
212 static void __clib_constructor __perfmon_bundle_registration_##x (void) \
214 perfmon_main_t *pm = &perfmon_main; \
215 __perfmon_bundle_##x.next = pm->bundles; \
216 __perfmon_bundle_##x.type = \
217 perfmon_cpu_supported_bundle_type (&__perfmon_bundle_##x); \
218 pm->bundles = &__perfmon_bundle_##x; \
220 perfmon_bundle_t __perfmon_bundle_##x
226 #define PERFMON_STRINGS(...) \
227 (char *[]) { __VA_ARGS__, 0 }
@ PERFMON_OFFSET_TYPE_METRICS
clib_error_t * perfmon_start(vlib_main_t *vm, perfmon_bundle_t *)
struct perfmon_bundle perfmon_bundle_t
int(* clib_cpu_supports_func_t)()
@ PERFMON_BUNDLE_TYPE_NODE
perfmon_bundle_type_t type
@ PERFMON_BUNDLE_TYPE_MAX
clib_cpu_supports_func_t cpu_supports
perfmon_bundle_t * active_bundle
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
perfmon_bundle_t * bundles
@ PERFMON_BUNDLE_TYPE_UNKNOWN
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
perfmon_instance_type_t * instances_by_type
uword() vlib_node_function_t(struct vlib_main_t *vm, struct vlib_node_runtime_t *node, struct vlib_frame_t *frame)
perfmon_instance_type_t * active_instance_type
perfmon_thread_runtime_t * thread_runtimes
perfmon_source_init_fn_t * init_fn
struct perfmon_source * next
static uword perfmon_cpu_supported_bundle_type(perfmon_bundle_t *b)
perfmon_source_t * sources
perfmon_cpu_supports_t * cpu_supports
@ PERFMON_BUNDLE_TYPE_THREAD
struct perfmon_source perfmon_source_t
perfmon_offset_type_t offset_type
perfmon_bundle_t * bundle
perfmon_main_t perfmon_main
@ PERFMON_BUNDLE_TYPE_SYSTEM
@ PERFMON_OFFSET_TYPE_MMAP
format_function_t * format_config
vlib_node_function_t perfmon_dispatch_wrapper_metrics
u32 metrics[PERF_MAX_EVENTS]
void perfmon_reset(vlib_main_t *vm)
perfmon_bundle_init_fn_t * init_fn
@ PERFMON_OFFSET_TYPE_MAX
u32 events[PERF_MAX_EVENTS]
clib_error_t *() perfmon_bundle_init_fn_t(vlib_main_t *vm, struct perfmon_bundle *)
perfmon_instance_t * instances
clib_error_t * perfmon_stop(vlib_main_t *vm)
perfmon_instance_type_t * default_instance_type
perfmon_node_stats_t * node_stats
clib_error_t *() perfmon_source_init_fn_t(vlib_main_t *vm, struct perfmon_source *)
format_function_t * format_fn
vlib_node_function_t perfmon_dispatch_wrapper_mmap
struct perfmon_bundle * next
perfmon_bundle_type_t bundle_type
vl_api_fib_path_type_t type