• Q
    perf: Adjust the perf initialization · b00d7f29
    Qiaowei Ren 提交于
    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: NQiaowei Ren <qiaowei.ren@intel.com>
    b00d7f29
virperf.c 8.3 KB