FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
perfmon.h File Reference
+ Include dependency graph for perfmon.h:

Go to the source code of this file.

Data Structures

struct  perfmon_event_t
 
struct  perfmon_instance_t
 
struct  perfmon_instance_type_t
 
struct  perfmon_source
 
struct  perfmon_bundle
 
struct  perfmon_reading_t
 
struct  perfmon_node_stats_t
 
struct  perfmon_thread_runtime_t
 
struct  perfmon_main_t
 

Macros

#define PERF_MAX_EVENTS   7 /* 3 fixed and 4 programmable */
 
#define foreach_permon_offset_type
 
#define PERFMON_REGISTER_SOURCE(x)
 
#define PERFMON_REGISTER_BUNDLE(x)
 
#define PERFMON_STRINGS(...)   (char *[]) { __VA_ARGS__, 0 }
 

Typedefs

typedef clib_error_t *() perfmon_source_init_fn_t(vlib_main_t *vm, struct perfmon_source *)
 
typedef struct perfmon_source perfmon_source_t
 
typedef clib_error_t *() perfmon_bundle_init_fn_t(vlib_main_t *vm, struct perfmon_bundle *)
 
typedef struct perfmon_bundle perfmon_bundle_t
 

Enumerations

enum  perfmon_bundle_type_t { PERFMON_BUNDLE_TYPE_UNKNOWN, PERFMON_BUNDLE_TYPE_NODE, PERFMON_BUNDLE_TYPE_THREAD, PERFMON_BUNDLE_TYPE_SYSTEM }
 
enum  perfmon_offset_type_t { PERFMON_OFFSET_TYPE_MMAP, PERFMON_OFFSET_TYPE_METRICS, PERFMON_OFFSET_TYPE_MAX }
 

Functions

void perfmon_reset (vlib_main_t *vm)
 
clib_error_tperfmon_start (vlib_main_t *vm, perfmon_bundle_t *)
 
clib_error_tperfmon_stop (vlib_main_t *vm)
 

Variables

vlib_node_function_t perfmon_dispatch_wrapper_mmap
 
vlib_node_function_t perfmon_dispatch_wrapper_metrics
 
perfmon_main_t perfmon_main
 

Macro Definition Documentation

◆ foreach_permon_offset_type

#define foreach_permon_offset_type

◆ PERF_MAX_EVENTS

#define PERF_MAX_EVENTS   7 /* 3 fixed and 4 programmable */

Definition at line 26 of file perfmon.h.

◆ PERFMON_REGISTER_BUNDLE

#define PERFMON_REGISTER_BUNDLE (   x)
Value:
perfmon_bundle_t __perfmon_bundle_##x; \
static void __clib_constructor __perfmon_bundle_registration_##x (void) \
{ \
perfmon_main_t *pm = &perfmon_main; \
__perfmon_bundle_##x.next = pm->bundles; \
pm->bundles = &__perfmon_bundle_##x; \
} \
perfmon_bundle_t __perfmon_bundle_##x

Definition at line 181 of file perfmon.h.

◆ PERFMON_REGISTER_SOURCE

#define PERFMON_REGISTER_SOURCE (   x)
Value:
perfmon_source_t __perfmon_source_##x; \
static void __clib_constructor __perfmon_source_registration_##x (void) \
{ \
perfmon_main_t *pm = &perfmon_main; \
__perfmon_source_##x.next = pm->sources; \
pm->sources = &__perfmon_source_##x; \
} \
perfmon_source_t __perfmon_source_##x

Definition at line 171 of file perfmon.h.

◆ PERFMON_STRINGS

#define PERFMON_STRINGS (   ...)    (char *[]) { __VA_ARGS__, 0 }

Definition at line 195 of file perfmon.h.

Typedef Documentation

◆ perfmon_bundle_init_fn_t

typedef clib_error_t*() perfmon_bundle_init_fn_t(vlib_main_t *vm, struct perfmon_bundle *)

Definition at line 95 of file perfmon.h.

◆ perfmon_bundle_t

◆ perfmon_source_init_fn_t

typedef clib_error_t*() perfmon_source_init_fn_t(vlib_main_t *vm, struct perfmon_source *)

Definition at line 79 of file perfmon.h.

◆ perfmon_source_t

Enumeration Type Documentation

◆ perfmon_bundle_type_t

Enumerator
PERFMON_BUNDLE_TYPE_UNKNOWN 
PERFMON_BUNDLE_TYPE_NODE 
PERFMON_BUNDLE_TYPE_THREAD 
PERFMON_BUNDLE_TYPE_SYSTEM 

Definition at line 28 of file perfmon.h.

◆ perfmon_offset_type_t

Enumerator
PERFMON_OFFSET_TYPE_MMAP 
PERFMON_OFFSET_TYPE_METRICS 
PERFMON_OFFSET_TYPE_MAX 

Definition at line 36 of file perfmon.h.

Function Documentation

◆ perfmon_reset()

void perfmon_reset ( vlib_main_t vm)

Definition at line 45 of file perfmon.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ perfmon_start()

clib_error_t* perfmon_start ( vlib_main_t vm,
perfmon_bundle_t  
)

Definition at line 216 of file perfmon.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ perfmon_stop()

clib_error_t* perfmon_stop ( vlib_main_t vm)

Definition at line 262 of file perfmon.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ perfmon_dispatch_wrapper_metrics

vlib_node_function_t perfmon_dispatch_wrapper_metrics

Definition at line 73 of file perfmon.h.

◆ perfmon_dispatch_wrapper_mmap

vlib_node_function_t perfmon_dispatch_wrapper_mmap

Definition at line 71 of file perfmon.h.

◆ perfmon_main

perfmon_main_t perfmon_main

Definition at line 27 of file perfmon.c.

PERFMON_OFFSET_TYPE_METRICS
@ PERFMON_OFFSET_TYPE_METRICS
Definition: perfmon.h:39
perfmon_main_t::bundles
perfmon_bundle_t * bundles
Definition: perfmon.h:156
perfmon_bundle
Definition: perfmon.h:98
perfmon_main_t::sources
perfmon_source_t * sources
Definition: perfmon.h:158
perfmon_source
Definition: perfmon.h:81
perfmon_main
perfmon_main_t perfmon_main
Definition: perfmon.c:27
PERFMON_OFFSET_TYPE_MMAP
@ PERFMON_OFFSET_TYPE_MMAP
Definition: perfmon.h:38
perfmon_dispatch_wrapper_metrics
vlib_node_function_t perfmon_dispatch_wrapper_metrics
Definition: perfmon.h:73
perfmon_dispatch_wrapper_mmap
vlib_node_function_t perfmon_dispatch_wrapper_mmap
Definition: perfmon.h:71