From 12629888fccf063580a0541a9e77aac0086b6e72 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Fri, 7 Oct 2016 07:55:51 -0400 Subject: [PATCH] docs: Alter descriptions of perf cpu_cycles https://bugzilla.redhat.com/show_bug.cgi?id=1381714 Alter the descriptions to match what the cpu_cycles actually is --- docs/formatdomain.html.in | 2 +- include/libvirt/libvirt-domain.h | 3 ++- src/libvirt-domain.c | 2 +- src/util/virperf.h | 2 +- tools/virsh.pod | 9 +++++---- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 1266e9d164..b989c8f9a4 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -1954,7 +1954,7 @@ cpu_cycles - the number of cpu cycles one instruction needs + the count of cpu cycles (total/elapsed) perf.cpu_cycles diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index ec94cdfd22..2342820e83 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -2008,7 +2008,8 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * VIR_PERF_PARAM_CPU_CYCLES: * * Macro for typed parameter name that represents cpu_cycles perf event - * which can be used to measure how many cpu cycles one instruction needs. + * describing the total/elapsed cpu cycles. This can be used to measure + * how many cpu cycles one instruction needs. * It corresponds to the "perf.cpu_cycles" field in the *Stats APIs. */ # define VIR_PERF_PARAM_CPU_CYCLES "cpu_cycles" diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 9ba9f49a2d..f9f5a46964 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -11482,7 +11482,7 @@ virConnectGetDomainCapabilities(virConnectPtr conn, * It is produced by cache_references perf event. * "perf.instructions" - The count of instructions as unsigned long long. * It is produced by instructions perf event. - * "perf.cpu_cycles" - The number of cpu cycles one instruction needs as + * "perf.cpu_cycles" - The count of cpu cycles (total/elapsed) as an * unsigned long long. It is produced by cpu_cycles * perf event. * diff --git a/src/util/virperf.h b/src/util/virperf.h index 41be8781c6..3fca2d0352 100644 --- a/src/util/virperf.h +++ b/src/util/virperf.h @@ -32,7 +32,7 @@ typedef enum { VIR_PERF_EVENT_MBMT, /* Memory Bandwidth Monitoring Total */ VIR_PERF_EVENT_MBML, /* Memory Bandwidth Monitor Limit for controller */ - VIR_PERF_EVENT_CPU_CYCLES, /* CPU Cycles per instruction */ + VIR_PERF_EVENT_CPU_CYCLES, /* Count of CPU Cycles (total/elapsed) */ VIR_PERF_EVENT_INSTRUCTIONS, /* Count of instructions for application */ VIR_PERF_EVENT_CACHE_REFERENCES, /* Cache hits by applications */ VIR_PERF_EVENT_CACHE_MISSES, /* Cache misses by applications */ diff --git a/tools/virsh.pod b/tools/virsh.pod index 227c9b2218..85992debc9 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -934,7 +934,7 @@ I<--perf> returns the statistics of all enabled perf events: "perf.cmt" - the cache usage in Byte currently used "perf.mbmt" - total system bandwidth from one level of cache "perf.mbml" - bandwidth of memory traffic for a memory controller -"perf.cpu_cycles" - the number of cpu cycles one instruction needs +"perf.cpu_cycles" - the count of cpu cycles (total/elapsed) "perf.instructions" - the count of instructions "perf.cache_references" - the count of cache hits "perf.cache_misses" - the count of caches misses @@ -2247,9 +2247,10 @@ B applications running on th e platform. instructions - Provides the count of instructions executed by applications running on the platform. - cpu_cycles - Provides the number of cpu_cycles for one - instruction. May be used with instructions - in order to get a cycles per instruction. + cpu_cycles - Provides the count of cpu cycles + (total/elapsed). May be used with + instructions in order to get a cycles + per instruction. B: The statistics can be retrieved using the B command using the I<--perf> flag.