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

Go to the source code of this file.

Data Structures

struct  file_by_model_and_stepping_t
 
struct  sort_nvp_t
 

Functions

static void set_perfmon_json_path ()
 
static u32 get_cpuid (void)
 
static clib_error_tperfmon_init (vlib_main_t *vm)
 
 VLIB_PLUGIN_REGISTER ()
 
static uword atox (u8 *s)
 
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_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 char * perfmon_json_path = "/usr/share/vpp/plugins/perfmon"
 
static const file_by_model_and_stepping_t fms_table []
 
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

◆ atox()

static uword atox ( u8 s)
static

Definition at line 216 of file perfmon.c.

+ Here is the caller graph for this function:

◆ capture_name_sort()

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

Definition at line 400 of file perfmon.c.

+ Here is the caller graph for this 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 
)
static

Definition at line 643 of file perfmon.c.

+ Here is the call graph for this function:

◆ format_capture()

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

Definition at line 410 of file perfmon.c.

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

◆ format_generic_events()

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

Definition at line 489 of file perfmon.c.

+ Here is the caller graph for this function:

◆ format_processor_events()

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

Definition at line 519 of file perfmon.c.

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

◆ get_cpuid()

static u32 get_cpuid ( void  )
inlinestatic

Definition at line 128 of file perfmon.c.

+ Here is the caller graph for this function:

◆ perfmon_init()

static clib_error_t* perfmon_init ( vlib_main_t vm)
static

Definition at line 141 of file perfmon.c.

+ Here is the call graph for this function:

◆ set_perfmon_json_path()

static void set_perfmon_json_path ( )
static

Definition at line 98 of file perfmon.c.

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

◆ set_pmc_command_fn()

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 294 of file perfmon.c.

+ Here is the call graph for this function:

◆ show_pmc_command_fn()

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 563 of file perfmon.c.

+ Here is the call graph for this function:

◆ sort_nvps_by_name()

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

Definition at line 510 of file perfmon.c.

+ Here is the caller graph for this function:

◆ unformat_processor_event()

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

Definition at line 238 of file perfmon.c.

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

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

Variable Documentation

◆ clear_pmc_command

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:643

(constructor) VLIB_CLI_COMMAND (clear_pmc_command)

Definition at line 671 of file perfmon.c.

◆ fms_table

const file_by_model_and_stepping_t fms_table[]
static

Definition at line 41 of file perfmon.c.

◆ perfmon_json_path

char* perfmon_json_path = "/usr/share/vpp/plugins/perfmon"
static

Definition at line 29 of file perfmon.c.

◆ perfmon_main

perfmon_main_t perfmon_main

Definition at line 27 of file perfmon.c.

◆ set_pmc_command

vlib_cli_command_t set_pmc_command
static
Initial value:
=
{
.path = "set pmc",
.short_help = "set pmc c1 [..., use \"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:294

(constructor) VLIB_CLI_COMMAND (set_pmc_command)

Definition at line 390 of file perfmon.c.

◆ show_pmc_command

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:563

(constructor) VLIB_CLI_COMMAND (show_pmc_command)

Definition at line 633 of file perfmon.c.