22 #include <vpp/app/version.h> 23 #include <linux/limits.h> 24 #include <sys/ioctl.h> 26 #include <perfmon/perfmon.h> 35 counters[6] = _rdpmc (pmc_index[6]);
37 counters[5] = _rdpmc (pmc_index[5]);
39 counters[4] = _rdpmc (pmc_index[4]);
41 counters[3] = _rdpmc (pmc_index[3]);
43 counters[2] = _rdpmc (pmc_index[2]);
45 counters[1] = _rdpmc (pmc_index[1]);
47 counters[0] = _rdpmc (pmc_index[0]);
104 rv = node->
function (vm, node, frame);
113 for (
int i = 0;
i < n_events;
i++)
114 s->
value[
i] += after[
i] - before[
i];
158 rv = node->
function (vm, node, frame);
vnet_interface_output_runtime_t * rt
u32 metrics[PERF_MAX_EVENTS]
static_always_inline void clib_prefetch_load(void *p)
Optimized string handling code, including c11-compliant "safe C library" variants.
struct perf_event_mmap_page * mmap_pages[PERF_MAX_EVENTS]
perfmon_node_stats_t * node_stats
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
perfmon_thread_runtime_t * thread_runtimes
perfmon_main_t perfmon_main
static_always_inline int perfmon_calc_mmap_offset(perfmon_thread_runtime_t *tr, u8 i)
#define static_always_inline
vlib_node_function_t * function
Node function to call.
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
u32 node_index
Node index.
uword perfmon_dispatch_wrapper_mmap(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
sll srl srl sll sra u16x4 i
u64 value[PERF_MAX_EVENTS]
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
static_always_inline void perfmon_read_pmcs(u64 *counters, int *pmc_index, u8 n_counters)
vlib_main_t vlib_node_runtime_t * node
perfmon_bundle_t * bundle
uword perfmon_dispatch_wrapper_metrics(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static_always_inline int perfmon_metric_index(perfmon_bundle_t *b, u8 i)
struct perfmon_node_stats_t::@759::@761 t[2]