From dc311c6b3db2c3df52b8178aad86625f71ae1598 Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Wed, 7 Feb 2018 15:24:22 +0100 Subject: [PATCH] SVG: A_PWR_CPU activity: Don't display offline CPU Offline CPU are no longer displayed. This should also apply to CPU frequency statistics and its graphs. Signed-off-by: Sebastien GODARD --- svg_stats.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/svg_stats.c b/svg_stats.c index bf8ad82..e2867af 100644 --- a/svg_stats.c +++ b/svg_stats.c @@ -4188,6 +4188,10 @@ __print_funct_t svg_print_pwr_cpufreq_stats(struct activity *a, int curr, int ac spc = (struct stats_pwr_cpufreq *) ((char *) a->buf[curr] + i * a->msize); spp = (struct stats_pwr_cpufreq *) ((char *) a->buf[!curr] + i * a->msize); + if (!spc->cpufreq) + /* This CPU is offline: Don't display it */ + continue; + /* Should current CPU (including CPU "all") be displayed? */ if (!(a->bitmap->b_array[i >> 3] & (1 << (i & 0x07)))) /* No */ @@ -4221,7 +4225,7 @@ __print_funct_t svg_print_pwr_cpufreq_stats(struct activity *a, int curr, int ac draw_activity_graphs(a->g_nr, g_type, title, g_title, item_name, group, spmin + i, spmax + i, out + i, outsize + i, - svg_p, record_hdr, FALSE); + svg_p, record_hdr, i); } /* Free remaining structures */ -- 2.40.0