| rte_pmu.h(3) | Library Functions Manual | rte_pmu.h(3) |
NAME¶
rte_pmu.h
SYNOPSIS¶
#include <linux/perf_event.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
#include <rte_common.h>
#include <rte_compat.h>
#include <rte_debug.h>
#include <rte_lcore.h>
Data Structures¶
struct rte_pmu_event_group
struct rte_pmu
Macros¶
#define RTE_MAX_NUM_GROUP_EVENTS 8
Functions¶
static __rte_experimental __rte_always_inline uint64_t
__rte_pmu_read_userpage (struct perf_event_mmap_page *pc)
__rte_experimental int __rte_pmu_enable_group (struct
rte_pmu_event_group *group)
__rte_experimental int rte_pmu_init (void)
__rte_experimental void rte_pmu_fini (void)
__rte_experimental int rte_pmu_add_event (const char *name)
static __rte_experimental __rte_always_inline uint64_t
rte_pmu_read (unsigned int index)
Variables¶
struct rte_pmu rte_pmu
Detailed Description¶
Performance Monitoring Unit (PMU) event tracing operations
This file defines generic API and types necessary to setup PMU and read selected counters in runtime. Exported functions are generally not MT-safe. One exception is rte_pmu_read() which can be called concurrently once everything has been setup.
In order to initialize the library, following sequence of calls performed by the same EAL thread is required:
rte_pmu_init() rte_pmu_add_event()
Afterwards all threads can read events by calling rte_pmu_read().
Definition in file rte_pmu.h.
Macro Definition Documentation¶
#define RTE_MAX_NUM_GROUP_EVENTS 8¶
Maximum number of events in a group.
Definition at line 48 of file rte_pmu.h.
Function Documentation¶
__rte_experimental __rte_always_inline uint64_t __rte_pmu_read_userpage (struct perf_event_mmap_page * pc) [static]¶
Warning
Read PMU counter.
Warning
Parameters
Returns
Definition at line 95 of file rte_pmu.h.
__rte_experimental int __rte_pmu_enable_group (struct rte_pmu_event_group * group)¶
Warning
Enable group of events on the calling lcore.
Warning
Parameters
Returns
__rte_experimental int rte_pmu_init (void )¶
Warning
Initialize PMU library.
Returns
__rte_experimental void rte_pmu_fini (void )¶
Warning
Finalize PMU library.
__rte_experimental int rte_pmu_add_event (const char * name)¶
Warning
Add event to the group of enabled events.
Parameters
Returns
__rte_experimental __rte_always_inline uint64_t rte_pmu_read (unsigned int index) [static]¶
Warning
Read hardware counter configured to count occurrences of an event.
This is called by an lcore (EAL thread) bound exclusively to particular CPU and may not work as expected if gets migrated elsewhere. Reason being event group is pinned hence not supposed to be multiplexed with any other events. This is the only API which can be called concurrently by different lcores.
Parameters
Returns
Definition at line 204 of file rte_pmu.h.
Variable Documentation¶
struct rte_pmu rte_pmu [extern]¶
PMU state container.
Author¶
Generated automatically by Doxygen for DPDK from the source code.
| Version 25.11.0 | DPDK |