[libvirt] [PATCH 1/2] perf: Refactor perf code