FD.io VPP  v19.08-27-gf4dcae4
Vector Packet Processing
stat_segment.h File Reference
+ Include dependency graph for stat_segment.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  stat_segment_directory_entry_t
 
struct  stat_segment_shared_header_t
 
struct  stat_segment_gauges_pool_t
 
struct  stat_segment_main_t
 

Macros

#define foreach_stat_segment_counter_name
 
#define STAT_SEGMENT_DEFAULT_SIZE   (32<<20)
 
#define STAT_SEGMENT_VERSION   1
 

Typedefs

typedef void(* stat_segment_update_fn) (stat_segment_directory_entry_t *e, u32 i)
 

Enumerations

enum  stat_segment_counter_t {
  STAT_COUNTER_VECTOR_RATE = 0, STAT_COUNTER_NUM_WORKER_THREADS, STAT_COUNTER_VECTOR_RATE_PER_WORKER, STAT_COUNTER_INPUT_RATE,
  STAT_COUNTER_LAST_UPDATE, STAT_COUNTER_LAST_STATS_CLEAR, STAT_COUNTER_HEARTBEAT, STAT_COUNTER_NODE_CLOCKS,
  STAT_COUNTER_NODE_VECTORS, STAT_COUNTER_NODE_CALLS, STAT_COUNTER_NODE_SUSPENDS, STAT_COUNTER_INTERFACE_NAMES,
  STAT_COUNTER_NODE_NAMES, STAT_COUNTER_MEM_STATSEG_TOTAL, STAT_COUNTER_MEM_STATSEG_USED, STAT_COUNTERS
}
 

Functions

static uint64_t stat_segment_offset (void *start, void *data)
 
static void * stat_segment_pointer (void *start, uint64_t offset)
 
clib_error_tstat_segment_register_gauge (u8 *names, stat_segment_update_fn update_fn, u32 index)
 

Variables

stat_segment_main_t stat_segment_main
 

Macro Definition Documentation

#define foreach_stat_segment_counter_name
Value:
_(VECTOR_RATE, SCALAR_INDEX, vector_rate, /sys) \
_(VECTOR_RATE_PER_WORKER, COUNTER_VECTOR_SIMPLE, \
vector_rate_per_worker, /sys) \
_(NUM_WORKER_THREADS, SCALAR_INDEX, num_worker_threads, /sys) \
_(INPUT_RATE, SCALAR_INDEX, input_rate, /sys) \
_(LAST_UPDATE, SCALAR_INDEX, last_update, /sys) \
_(LAST_STATS_CLEAR, SCALAR_INDEX, last_stats_clear, /sys) \
_(HEARTBEAT, SCALAR_INDEX, heartbeat, /sys) \
_(NODE_CLOCKS, COUNTER_VECTOR_SIMPLE, clocks, /sys/node) \
_(NODE_VECTORS, COUNTER_VECTOR_SIMPLE, vectors, /sys/node) \
_(NODE_CALLS, COUNTER_VECTOR_SIMPLE, calls, /sys/node) \
_(NODE_SUSPENDS, COUNTER_VECTOR_SIMPLE, suspends, /sys/node) \
_(INTERFACE_NAMES, NAME_VECTOR, names, /if) \
_(NODE_NAMES, NAME_VECTOR, names, /sys/node) \
_(MEM_STATSEG_TOTAL, SCALAR_INDEX, total, /mem/statseg) \
_(MEM_STATSEG_USED, SCALAR_INDEX, used, /mem/statseg)
void * mem

Definition at line 44 of file stat_segment.h.

#define STAT_SEGMENT_DEFAULT_SIZE   (32<<20)

Definition at line 75 of file stat_segment.h.

#define STAT_SEGMENT_VERSION   1

Definition at line 78 of file stat_segment.h.

Typedef Documentation

typedef void(* stat_segment_update_fn) (stat_segment_directory_entry_t *e, u32 i)

Definition at line 105 of file stat_segment.h.

Enumeration Type Documentation

Enumerator
STAT_COUNTER_VECTOR_RATE 
STAT_COUNTER_NUM_WORKER_THREADS 
STAT_COUNTER_VECTOR_RATE_PER_WORKER 
STAT_COUNTER_INPUT_RATE 
STAT_COUNTER_LAST_UPDATE 
STAT_COUNTER_LAST_STATS_CLEAR 
STAT_COUNTER_HEARTBEAT 
STAT_COUNTER_NODE_CLOCKS 
STAT_COUNTER_NODE_VECTORS 
STAT_COUNTER_NODE_CALLS 
STAT_COUNTER_NODE_SUSPENDS 
STAT_COUNTER_INTERFACE_NAMES 
STAT_COUNTER_NODE_NAMES 
STAT_COUNTER_MEM_STATSEG_TOTAL 
STAT_COUNTER_MEM_STATSEG_USED 
STAT_COUNTERS 

Definition at line 24 of file stat_segment.h.

Function Documentation

static uint64_t stat_segment_offset ( void *  start,
void *  data 
)
inlinestatic

Definition at line 94 of file stat_segment.h.

+ Here is the caller graph for this function:

static void* stat_segment_pointer ( void *  start,
uint64_t  offset 
)
inlinestatic

Definition at line 100 of file stat_segment.h.

+ Here is the caller graph for this function:

clib_error_t* stat_segment_register_gauge ( u8 names,
stat_segment_update_fn  update_fn,
u32  index 
)

Definition at line 732 of file stat_segment.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

stat_segment_main_t stat_segment_main

Definition at line 27 of file stat_segment.c.