Commit 1b870fa
committed
kvm: stats: tell userspace which values are boolean
Some of the statistics values exported by KVM are always only 0 or 1.
It can be useful to export this fact to userspace so that it can track
them specially (for example by polling the value every now and then to
compute a % of time spent in a specific state).
Therefore, add "boolean value" as a new "unit". While it is not exactly
a unit, it walks and quacks like one. In particular, using the type
would be wrong because boolean values could be instantaneous or peak
values (e.g. "is the rmap allocated?") or even two-bucket histograms
(e.g. "number of posted vs. non-posted interrupt injections").
Suggested-by: Amneesh Singh <natto@weirdnatto.in>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 84e7051 commit 1b870fa
4 files changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5657 | 5657 | | |
5658 | 5658 | | |
5659 | 5659 | | |
| 5660 | + | |
5660 | 5661 | | |
5661 | 5662 | | |
5662 | 5663 | | |
| |||
5724 | 5725 | | |
5725 | 5726 | | |
5726 | 5727 | | |
| 5728 | + | |
| 5729 | + | |
| 5730 | + | |
| 5731 | + | |
| 5732 | + | |
5727 | 5733 | | |
5728 | 5734 | | |
5729 | 5735 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
| 301 | + | |
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1822 | 1822 | | |
1823 | 1823 | | |
1824 | 1824 | | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
1825 | 1834 | | |
1826 | 1835 | | |
1827 | 1836 | | |
| |||
1853 | 1862 | | |
1854 | 1863 | | |
1855 | 1864 | | |
1856 | | - | |
| 1865 | + | |
1857 | 1866 | | |
1858 | 1867 | | |
1859 | 1868 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2083 | 2083 | | |
2084 | 2084 | | |
2085 | 2085 | | |
| 2086 | + | |
2086 | 2087 | | |
2087 | 2088 | | |
2088 | 2089 | | |
| |||
0 commit comments