]> xenbits.xensource.com Git - libvirt.git/commit
Extend virCgroupGetPercpuStats to fill in vcputime too
authorJán Tomko <jtomko@redhat.com>
Thu, 3 Apr 2014 15:53:43 +0000 (17:53 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 9 Apr 2014 14:24:08 +0000 (16:24 +0200)
commit897808e74fd8396d011990a5574d7cdbeea814fe
tree5b09e368c4840f4e1585ff58b75ed5b28c00eb41
parent23d2d863b719be18f29306ecec41ee319b63e04f
Extend virCgroupGetPercpuStats to fill in vcputime too

Currently, virCgroupGetPercpuStats is only used by the LXC driver,
filling out the CPUTIME stats. qemuDomainGetPercpuStats does this
and also filles out VCPUTIME stats.

Extend virCgroupGetPercpuStats to also report VCPUTIME stats if
nvcpupids is non-zero. In the LXC driver, we don't have cpupids.
In the QEMU driver, there is at least one cpupid for a running domain,
so the behavior shouldn't change for QEMU either.

Also rename getSumVcpuPercpuStats to virCgroupGetPercpuVcpuSum.
src/lxc/lxc_driver.c
src/qemu/qemu_driver.c
src/util/vircgroup.c
src/util/vircgroup.h
tests/vircgrouptest.c