All PERF_* names are enmus. Enums are ordinary code for CPP.
An ifdef does not trigger.
Fixes 1d29c889a ("Make use of PERF_COUNT_HW_REF_CPU_CYCLES conditional")

Signed-off-by: Olaf Hering <o...@aepfle.de>
---
 src/util/virperf.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/util/virperf.c b/src/util/virperf.c
index e39cebbe0..33039544a 100644
--- a/src/util/virperf.c
+++ b/src/util/virperf.c
@@ -108,13 +108,8 @@ static struct virPerfEventAttr attrs[] = {
      .attrType = PERF_TYPE_HARDWARE,
      .attrConfig = PERF_COUNT_HW_STALLED_CYCLES_BACKEND},
     {.type = VIR_PERF_EVENT_REF_CPU_CYCLES,
-# ifdef PERF_COUNT_HW_REF_CPU_CYCLES
      .attrType = PERF_TYPE_HARDWARE,
      .attrConfig = PERF_COUNT_HW_REF_CPU_CYCLES
-# else
-     .attrType = 0,
-     .attrConfig = 0,
-# endif
     },
     {.type = VIR_PERF_EVENT_CPU_CLOCK,
      .attrType = PERF_TYPE_SOFTWARE,

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to