This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1381714 - possible documentation error for the recently added cpu_cycles statistic
possible documentation error for the recently added cpu_cycles statistic
Status: CLOSED NEXTRELEASE
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: John Ferlan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-04 15:32 EDT by Frank Ch. Eigler
Modified: 2016-10-07 13:33 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-10-07 13:33:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Frank Ch. Eigler 2016-10-04 15:32:39 EDT
https://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=bae660869de0612bee2a740083fb494c27e3f80c

added a "cpu_cycles" statistic to the libvirt api.  It documents it thusly, in various places.

<td>the number of cpu cycles one instruction needs</td>

This is incorrect, and probably came from a misunderstanding of the VIR_PERF_PARAM_CPU_CYCLES blurb:

Macro for typed parameter name that represents cpu_cycles perf event which can be used to measure how many cpu cycles one instruction needs. It corresponds to the "perf.cpu_cycles" field in the *Stats APIs.

The cpu_cycles counts cpu cycles (total/elapsed).  Only when divided by VIR_PERF_PARAM_INSTRUCTIONS does one get an *average* cycles-per-instruction (which would be represented by a FLOAT rather than LONG LONG anyway).

Please consider fixing the documentation.
Comment 1 John Ferlan 2016-10-07 08:44:58 EDT
Yeah when looking at things, I'm sure I thought that looks strange, but I didn't alter the original author's text assuming it was right...  The series which I altered was here:

http://www.redhat.com/archives/libvir-list/2016-July/msg00607.html

In any case, there's a patch upstream to alter the text for cpu_cycles (as part of a series of minor alterations):

http://www.redhat.com/archives/libvir-list/2016-October/msg00319.html

thanks!
Comment 2 John Ferlan 2016-10-07 13:33:47 EDT
Patches pushed - changes will be in libvirt 2.4.0

commit 12629888fccf063580a0541a9e77aac0086b6e72
Author: John Ferlan <jferlan@redhat.com>
Date:   Fri Oct 7 07:55:51 2016 -0400

    docs: Alter descriptions of perf cpu_cycles
...


$ git describe 12629888fccf063580a0541a9e77aac0086b6e72
v2.3.0-38-g1262988

See:

https://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=12629888fccf063580a0541a9e77aac0086b6e72

Note You need to log in before you can comment on or make changes to this bug.