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_bundle_init_fn_t * init_fn
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
perfmon_bundle_t * active_bundle
perfmon_instance_t * instances
perfmon_node_stats_t * node_stats
perfmon_thread_runtime_t * thread_runtimes
format_function_t * format_config
perfmon_instance_type_t * default_instance_type
struct perfmon_bundle perfmon_bundle_t
perfmon_instance_type_t * active_instance_type
vlib_node_function_t perfmon_dispatch_wrapper_metrics
struct perfmon_bundle * next
format_function_t * format_fn
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
clib_cpu_supports_func_t cpu_supports
clib_error_t *() perfmon_bundle_init_fn_t(vlib_main_t *vm, struct perfmon_bundle *)
perfmon_main_t perfmon_main
perfmon_bundle_type_t type
perfmon_source_t * sources
clib_error_t *() perfmon_source_init_fn_t(vlib_main_t *vm, struct perfmon_source *)
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_source_init_fn_t * init_fn
void perfmon_reset(vlib_main_t *vm)
struct perfmon_source perfmon_source_t
struct perfmon_source * next
vlib_node_function_t perfmon_dispatch_wrapper_mmap
perfmon_bundle_t * bundle
clib_error_t * perfmon_start(vlib_main_t *vm, perfmon_bundle_t *)
clib_error_t * perfmon_stop(vlib_main_t *vm)
int(* clib_cpu_supports_func_t)()
perfmon_offset_type_t offset_type
perfmon_bundle_t * bundles