]> granicus.if.org Git - sysstat/commitdiff
PCP: Make sure instances for per-CPU interrupts are created for all CPU
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 12 Feb 2022 14:55:36 +0000 (15:55 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 12 Feb 2022 14:55:36 +0000 (15:55 +0100)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
pcp_def_metrics.c

index 24e9309a7147275be286db5dd88bcc4fd8c2f799..65d7c0522e44bba57ca735f74fa1492680b157c0 100644 (file)
@@ -179,7 +179,12 @@ void pcp_def_cpu_metrics(struct activity *a)
                                pmiAddInstance(indom, buf, i - 1);
                        }
 
-                       if (first) {
+                       if (a->id == A_IRQ) {
+                               /* Create per-CPU interrupts metrics */
+                               pcp_def_percpu_int_metrics(a, i - 1);
+                       }
+
+                       else if (first) {
                                if (a->id == A_CPU) {
                                        /* Create metrics for A_CPU */
                                        pmiAddMetric("kernel.percpu.cpu.user",
@@ -253,10 +258,6 @@ void pcp_def_cpu_metrics(struct activity *a)
                                                     pmiUnits(0, 0, 1, 0, 0, PM_COUNT_ONE));
                                }
 
-                               else if (a->id == A_IRQ) {
-                                       /* Create per-CPU interrupts metrics */
-                                       pcp_def_percpu_int_metrics(a, i - 1);
-                               }
                                first = FALSE;
                        }
                }