]> xenbits.xensource.com Git - libvirt.git/commit
perf: Adjust the perf initialization
authorQiaowei Ren <qiaowei.ren@intel.com>
Wed, 3 Aug 2016 17:23:31 +0000 (13:23 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 2 Sep 2016 21:00:58 +0000 (17:00 -0400)
commitb00d7f298b7dd57d923bc9a9a6df47471e4eaab8
tree96922a0da28475da61ffe8f9512779a131b87c33
parent63358e0b871a5d421bcb7b1cb70ddd22bca99176
perf: Adjust the perf initialization

Introduce a static attr table and refactor virPerfEventEnable() for
general purpose usage.

This patch creates a static table/matrix that converts the VIR_PERF_EVENT_*
events into their respective "attr.type" and "attr.config" so that
virPerfEventEnable doesn't have the switch the calling function passes
by value the 'type'.

Signed-off-by: Qiaowei Ren <qiaowei.ren@intel.com>
src/util/virperf.c