FD.io VPP  v19.04-6-g6f05f72
Vector Packet Processing
perfmon.c File Reference
+ Include dependency graph for perfmon.c:

Go to the source code of this file.

Data Structures

struct  sort_nvp_t
 

Functions

void perfmon_register_intel_pmc (perfmon_intel_pmc_cpu_model_t *m, int n_models, perfmon_intel_pmc_event_t *e, int n_events)
 
static u32 get_cpuid (void)
 
static int perfmon_cpu_model_matches (perfmon_intel_pmc_cpu_model_t *mt, u32 n_models, u8 model, u8 stepping)
 
static perfmon_intel_pmc_event_tperfmon_find_table_by_model_stepping (perfmon_main_t *pm, u8 model, u8 stepping)
 
static clib_error_tperfmon_init (vlib_main_t *vm)
 
 VLIB_PLUGIN_REGISTER ()
 
static uword unformat_processor_event (unformat_input_t *input, va_list *args)
 
static clib_error_tset_pmc_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static int capture_name_sort (void *a1, void *a2)
 
static u8format_capture (u8 *s, va_list *args)
 
static u8format_generic_events (u8 *s, va_list *args)
 
static int sort_nvps_by_name (void *a1, void *a2)
 
static u8format_pmc_event (u8 *s, va_list *args)
 
static u8format_processor_events (u8 *s, va_list *args)
 
static clib_error_tshow_pmc_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tclear_pmc_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

perfmon_main_t perfmon_main
 
static vlib_cli_command_t set_pmc_command
 (constructor) VLIB_CLI_COMMAND (set_pmc_command) More...
 
static vlib_cli_command_t show_pmc_command
 (constructor) VLIB_CLI_COMMAND (show_pmc_command) More...
 
static vlib_cli_command_t clear_pmc_command
 (constructor) VLIB_CLI_COMMAND (clear_pmc_command) More...
 

Function Documentation

static int capture_name_sort ( void *  a1,
void *  a2 
)
static

Definition at line 344 of file perfmon.c.

+ Here is the caller graph for this function:

static clib_error_t* clear_pmc_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 595 of file perfmon.c.

+ Here is the call graph for this function:

static u8* format_capture ( u8 s,
va_list *  args 
)
static

Definition at line 354 of file perfmon.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_generic_events ( u8 s,
va_list *  args 
)
static

Definition at line 433 of file perfmon.c.

+ Here is the caller graph for this function:

static u8* format_pmc_event ( u8 s,
va_list *  args 
)
static

Definition at line 463 of file perfmon.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_processor_events ( u8 s,
va_list *  args 
)
static

Definition at line 480 of file perfmon.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 get_cpuid ( void  )
inlinestatic

Definition at line 46 of file perfmon.c.

+ Here is the caller graph for this function:

static int perfmon_cpu_model_matches ( perfmon_intel_pmc_cpu_model_t mt,
u32  n_models,
u8  model,
u8  stepping 
)
static

Definition at line 59 of file perfmon.c.

+ Here is the caller graph for this function:

static perfmon_intel_pmc_event_t* perfmon_find_table_by_model_stepping ( perfmon_main_t pm,
u8  model,
u8  stepping 
)
static

Definition at line 80 of file perfmon.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* perfmon_init ( vlib_main_t vm)
static

Definition at line 94 of file perfmon.c.

+ Here is the call graph for this function:

void perfmon_register_intel_pmc ( perfmon_intel_pmc_cpu_model_t m,
int  n_models,
perfmon_intel_pmc_event_t e,
int  n_events 
)

Definition at line 31 of file perfmon.c.

static clib_error_t* set_pmc_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 202 of file perfmon.c.

+ Here is the call graph for this function:

static clib_error_t* show_pmc_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 515 of file perfmon.c.

+ Here is the call graph for this function:

static int sort_nvps_by_name ( void *  a1,
void *  a2 
)
static

Definition at line 454 of file perfmon.c.

+ Here is the caller graph for this function:

static uword unformat_processor_event ( unformat_input_t input,
va_list *  args 
)
static

Definition at line 168 of file perfmon.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VLIB_PLUGIN_REGISTER ( )

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t clear_pmc_command
static
Initial value:
=
{
.path = "clear pmc",
.short_help = "clear the performance monitor counters",
.function = clear_pmc_command_fn,
}
static clib_error_t * clear_pmc_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: perfmon.c:595

(constructor) VLIB_CLI_COMMAND (clear_pmc_command)

Definition at line 623 of file perfmon.c.

perfmon_main_t perfmon_main

Definition at line 28 of file perfmon.c.

vlib_cli_command_t set_pmc_command
static
Initial value:
=
{
.path = "set pmc",
.short_help = "set pmc [threads n,n1-n2] c1... [see \"show pmc events\"]",
.function = set_pmc_command_fn,
.is_mp_safe = 1,
}
static clib_error_t * set_pmc_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: perfmon.c:202

(constructor) VLIB_CLI_COMMAND (set_pmc_command)

Definition at line 334 of file perfmon.c.

vlib_cli_command_t show_pmc_command
static
Initial value:
=
{
.path = "show pmc",
.short_help = "show pmc [verbose]",
.function = show_pmc_command_fn,
.is_mp_safe = 1,
}
static clib_error_t * show_pmc_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: perfmon.c:515

(constructor) VLIB_CLI_COMMAND (show_pmc_command)

Definition at line 585 of file perfmon.c.