FD.io VPP  v21.10.1-2-g0a485f517
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_cpu_supports_t
 
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   8 /* 4 fixed and 8 programmable on ICX */
 
#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,
  PERFMON_BUNDLE_TYPE_MAX
}
 
enum  perfmon_offset_type_t { PERFMON_OFFSET_TYPE_MMAP, PERFMON_OFFSET_TYPE_METRICS, PERFMON_OFFSET_TYPE_MAX }
 

Functions

static uword perfmon_cpu_supported_bundle_type (perfmon_bundle_t *b)
 
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   8 /* 4 fixed and 8 programmable on ICX */

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; \
__perfmon_bundle_##x.type = \
perfmon_cpu_supported_bundle_type (&__perfmon_bundle_##x); \
pm->bundles = &__perfmon_bundle_##x; \
} \
perfmon_bundle_t __perfmon_bundle_##x

Definition at line 210 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 200 of file perfmon.h.

◆ PERFMON_STRINGS

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

Definition at line 226 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 96 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 80 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 
PERFMON_BUNDLE_TYPE_MAX 

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 37 of file perfmon.h.

Function Documentation

◆ perfmon_cpu_supported_bundle_type()

static uword perfmon_cpu_supported_bundle_type ( perfmon_bundle_t b)
inlinestatic

Definition at line 183 of file perfmon.h.

◆ 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 74 of file perfmon.h.

◆ perfmon_dispatch_wrapper_mmap

vlib_node_function_t perfmon_dispatch_wrapper_mmap

Definition at line 72 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:40
perfmon_bundle::type
perfmon_bundle_type_t type
Definition: perfmon.h:111
perfmon_main_t::bundles
perfmon_bundle_t * bundles
Definition: perfmon.h:167
perfmon_bundle
Definition: perfmon.h:105
perfmon_main_t::sources
perfmon_source_t * sources
Definition: perfmon.h:169
perfmon_source
Definition: perfmon.h:82
perfmon_main
perfmon_main_t perfmon_main
Definition: perfmon.c:27
PERFMON_OFFSET_TYPE_MMAP
@ PERFMON_OFFSET_TYPE_MMAP
Definition: perfmon.h:39
perfmon_dispatch_wrapper_metrics
vlib_node_function_t perfmon_dispatch_wrapper_metrics
Definition: perfmon.h:74
perfmon_dispatch_wrapper_mmap
vlib_node_function_t perfmon_dispatch_wrapper_mmap
Definition: perfmon.h:72