mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-04 18:33:18 -05:00
perf: add stalled_cycles_frontend perf event support
This patch adds support and documentation for the stalled_cycles_frontend perf event. Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
This commit is contained in:
committed by
John Ferlan
parent
7d34731067
commit
060c159b08
@@ -11236,6 +11236,11 @@ virConnectGetDomainCapabilities(virConnectPtr conn,
|
||||
* long. It is produced by branch_misses perf event.
|
||||
* "perf.bus_cycles" - The count of bus cycles as unsigned long
|
||||
* long. It is produced by bus_cycles perf event.
|
||||
* "perf.stalled_cycles_frontend" - The count of stalled cpu cycles in the
|
||||
* frontend of the instruction processor
|
||||
* pipeline as unsigned long long. It is
|
||||
* produced by stalled_cycles_frontend
|
||||
* perf event.
|
||||
*
|
||||
* Note that entire stats groups or individual stat fields may be missing from
|
||||
* the output in case they are not supported by the given hypervisor, are not
|
||||
|
||||
@@ -9856,6 +9856,7 @@ qemuDomainSetPerfEvents(virDomainPtr dom,
|
||||
VIR_PERF_PARAM_BRANCH_INSTRUCTIONS, VIR_TYPED_PARAM_BOOLEAN,
|
||||
VIR_PERF_PARAM_BRANCH_MISSES, VIR_TYPED_PARAM_BOOLEAN,
|
||||
VIR_PERF_PARAM_BUS_CYCLES, VIR_TYPED_PARAM_BOOLEAN,
|
||||
VIR_PERF_PARAM_STALLED_CYCLES_FRONTEND, VIR_TYPED_PARAM_BOOLEAN,
|
||||
NULL) < 0)
|
||||
return -1;
|
||||
|
||||
|
||||
+4
-1
@@ -42,7 +42,7 @@ VIR_ENUM_IMPL(virPerfEvent, VIR_PERF_EVENT_LAST,
|
||||
"cpu_cycles", "instructions",
|
||||
"cache_references", "cache_misses",
|
||||
"branch_instructions", "branch_misses",
|
||||
"bus_cycles");
|
||||
"bus_cycles", "stalled_cycles_frontend");
|
||||
|
||||
struct virPerfEvent {
|
||||
int type;
|
||||
@@ -96,6 +96,9 @@ static struct virPerfEventAttr attrs[] = {
|
||||
{.type = VIR_PERF_EVENT_BUS_CYCLES,
|
||||
.attrType = PERF_TYPE_HARDWARE,
|
||||
.attrConfig = PERF_COUNT_HW_BUS_CYCLES},
|
||||
{.type = VIR_PERF_EVENT_STALLED_CYCLES_FRONTEND,
|
||||
.attrType = PERF_TYPE_HARDWARE,
|
||||
.attrConfig = PERF_COUNT_HW_STALLED_CYCLES_FRONTEND},
|
||||
};
|
||||
typedef struct virPerfEventAttr *virPerfEventAttrPtr;
|
||||
|
||||
|
||||
@@ -40,6 +40,9 @@ typedef enum {
|
||||
for applications */
|
||||
VIR_PERF_EVENT_BRANCH_MISSES, /* Count of branch misses for applications */
|
||||
VIR_PERF_EVENT_BUS_CYCLES, /* Count of bus cycles for applications*/
|
||||
VIR_PERF_EVENT_STALLED_CYCLES_FRONTEND, /* Count of stalled cpu cycles in
|
||||
the frontend of the instruction
|
||||
processor pipeline */
|
||||
|
||||
VIR_PERF_EVENT_LAST
|
||||
} virPerfEventType;
|
||||
|
||||
Reference in New Issue
Block a user