|
FD.io VPP
v21.06-3-gbb25fbf28
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 7
75 #define foreach_permon_offset_type \
76 _ (PERFMON_OFFSET_TYPE_MMAP, perfmon_dispatch_wrapper_mmap) \
77 _ (PERFMON_OFFSET_TYPE_METRICS, perfmon_dispatch_wrapper_metrics)
171 #define PERFMON_REGISTER_SOURCE(x) \
172 perfmon_source_t __perfmon_source_##x; \
173 static void __clib_constructor __perfmon_source_registration_##x (void) \
175 perfmon_main_t *pm = &perfmon_main; \
176 __perfmon_source_##x.next = pm->sources; \
177 pm->sources = &__perfmon_source_##x; \
179 perfmon_source_t __perfmon_source_##x
181 #define PERFMON_REGISTER_BUNDLE(x) \
182 perfmon_bundle_t __perfmon_bundle_##x; \
183 static void __clib_constructor __perfmon_bundle_registration_##x (void) \
185 perfmon_main_t *pm = &perfmon_main; \
186 __perfmon_bundle_##x.next = pm->bundles; \
187 pm->bundles = &__perfmon_bundle_##x; \
189 perfmon_bundle_t __perfmon_bundle_##x
195 #define PERFMON_STRINGS(...) \
196 (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_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
perfmon_source_t * sources
@ 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
clib_cpu_supports_func_t cpu_supports