Skip to content

Commit

Permalink
PCP: Make sure instances for per-CPU interrupts are created for all CPU
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastien GODARD <[email protected]>
  • Loading branch information
sysstat committed Feb 12, 2022
1 parent cc2fb31 commit 9a25646
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pcp_def_metrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 9a25646

Please sign in to comment.