|
u32 | vlib_simple_counter_n_counters (const vlib_simple_counter_main_t *cm) |
| The number of counters (not the number of per-thread counters) More...
|
|
static void | vlib_increment_simple_counter (vlib_simple_counter_main_t *cm, u32 thread_index, u32 index, u64 increment) |
| Increment a simple counter. More...
|
|
static void | vlib_decrement_simple_counter (vlib_simple_counter_main_t *cm, u32 thread_index, u32 index, u64 decrement) |
| Decrement a simple counter. More...
|
|
static void | vlib_set_simple_counter (vlib_simple_counter_main_t *cm, u32 thread_index, u32 index, u64 value) |
| Set a simple counter. More...
|
|
static counter_t | vlib_get_simple_counter (vlib_simple_counter_main_t *cm, u32 index) |
| Get the value of a simple counter Scrapes the entire set of per-thread counters. More...
|
|
static void | vlib_zero_simple_counter (vlib_simple_counter_main_t *cm, u32 index) |
| Clear a simple counter Clears the set of per-thread u16 counters, and the u64 counter. More...
|
|
static void | vlib_counter_add (vlib_counter_t *a, vlib_counter_t *b) |
| Add two combined counters, results in the first counter. More...
|
|
static void | vlib_counter_sub (vlib_counter_t *a, vlib_counter_t *b) |
| Subtract combined counters, results in the first counter. More...
|
|
static void | vlib_counter_zero (vlib_counter_t *a) |
| Clear a combined counter. More...
|
|
u32 | vlib_combined_counter_n_counters (const vlib_combined_counter_main_t *cm) |
| The number of counters (not the number of per-thread counters) More...
|
|
void | vlib_clear_simple_counters (vlib_simple_counter_main_t *cm) |
| Clear a collection of simple counters. More...
|
|
void | vlib_clear_combined_counters (vlib_combined_counter_main_t *cm) |
| Clear a collection of combined counters. More...
|
|
static void | vlib_increment_combined_counter (vlib_combined_counter_main_t *cm, u32 thread_index, u32 index, u64 n_packets, u64 n_bytes) |
| Increment a combined counter. More...
|
|
static void | vlib_prefetch_combined_counter (const vlib_combined_counter_main_t *cm, u32 thread_index, u32 index) |
| Pre-fetch a per-thread combined counter for the given object index. More...
|
|
static void | vlib_get_combined_counter (const vlib_combined_counter_main_t *cm, u32 index, vlib_counter_t *result) |
| Get the value of a combined counter, never called in the speed path Scrapes the entire set of per-thread counters. More...
|
|
static void | vlib_zero_combined_counter (vlib_combined_counter_main_t *cm, u32 index) |
| Clear a combined counter Clears the set of per-thread counters. More...
|
|
void | vlib_validate_simple_counter (vlib_simple_counter_main_t *cm, u32 index) |
| validate a simple counter More...
|
|
void | vlib_free_simple_counter (vlib_simple_counter_main_t *cm) |
|
void | vlib_validate_combined_counter (vlib_combined_counter_main_t *cm, u32 index) |
| validate a combined counter More...
|
|
int | vlib_validate_combined_counter_will_expand (vlib_combined_counter_main_t *cm, u32 index) |
|
void | vlib_free_combined_counter (vlib_combined_counter_main_t *cm) |
|
Optimized thread-safe counters.
Each vlib_[simple|combined]_counter_main_t consists of a per-thread vector of per-object counters.
The idea is to drastically eliminate atomic operations.
Definition in file counter.h.