DPDK
25.07.0
lib
pmu
rte_pmu_pmc_x86_64.h
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright(c) 2025 Marvell.
3
*/
4
5
#ifndef RTE_PMU_PMC_X86_64_H
6
#define RTE_PMU_PMC_X86_64_H
7
8
#include <
rte_common.h
>
9
10
static
__rte_always_inline
uint64_t
11
rte_pmu_pmc_read(
int
index)
12
{
13
uint64_t low, high;
14
15
asm
volatile
(
16
"rdpmc\n"
17
:
"=a"
(low),
"=d"
(high)
18
:
"c"
(index)
19
);
20
21
return
low | (high << 32);
22
}
23
#define rte_pmu_pmc_read rte_pmu_pmc_read
24
25
#endif
/* RTE_PMU_PMC_X86_64_H */
rte_common.h
__rte_always_inline
#define __rte_always_inline
Definition:
rte_common.h:490
Generated by
1.9.4