diff options
author | Tuukka Tikkanen <tuukka.tikkanen@linaro.org> | 2014-12-17 14:21:19 +0200 |
---|---|---|
committer | Tuukka Tikkanen <tuukka.tikkanen@linaro.org> | 2014-12-29 10:05:50 +0200 |
commit | 32be92848226e7ca785b3970c2e289cb1652421a (patch) | |
tree | 20e3191a50c8239b88eb39e2606172877d78f97c | |
parent | 9364b59a8cb8dc60db5cbe2a365d877d5c079a7a (diff) |
Topology: add support for dumping baseline data for CPUs
This patch adds relay of baseline data for per-cpu entries when
composing the report.
Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
-rw-r--r-- | idlestat.c | 6 | ||||
-rw-r--r-- | topology.c | 19 | ||||
-rw-r--r-- | topology.h | 2 |
3 files changed, 17 insertions, 10 deletions
@@ -110,7 +110,7 @@ static int get_trace_ts(double *ts) return -1; } -static int display_cstates(struct report_ops *ops, void *arg, char *cpu, void *report_data) +static int display_cstates(struct report_ops *ops, void *arg, void *baseline, char *cpu, void *report_data) { int i; bool cpu_header = false; @@ -136,7 +136,7 @@ static int display_cstates(struct report_ops *ops, void *arg, char *cpu, void *r return 0; } -static int display_pstates(struct report_ops *ops, void *arg, char *cpu, void *report_data) +static int display_pstates(struct report_ops *ops, void *arg, void *baseline, char *cpu, void *report_data) { int i; bool cpu_header = false; @@ -164,7 +164,7 @@ static int display_pstates(struct report_ops *ops, void *arg, char *cpu, void *r return 0; } -static int display_wakeup(struct report_ops *ops, void *arg, char *cpu, void *report_data) +static int display_wakeup(struct report_ops *ops, void *arg, void *baseline, char *cpu, void *report_data) { int i; bool cpu_header = false; @@ -500,7 +500,7 @@ int establish_idledata_to_topo(struct cpuidle_datas *datas) return 0; } -int dump_cpu_topo_info(struct report_ops *ops, void *report_data, int (*dump)(struct report_ops *, void *, char *, void *), struct cpu_topology *topo, int cstate) +int dump_cpu_topo_info(struct report_ops *ops, void *report_data, int (*dump)(struct report_ops *, void *, void *, char *, void *), struct cpu_topology *topo, int cstate) { struct cpu_physical *s_phy; struct cpu_core *s_core; @@ -513,20 +513,27 @@ int dump_cpu_topo_info(struct report_ops *ops, void *report_data, int (*dump)(st sprintf(tmp, "cluster%c", s_phy->physical_id + 'A'); if (cstate) - dump(ops, s_phy->cstates, tmp, report_data); + dump(ops, s_phy->cstates, NULL, tmp, report_data); list_for_each_entry(s_core, &s_phy->core_head, list_core) { if (s_core->is_ht && cstate) { sprintf(tmp, "core%d", s_core->core_id); - dump(ops, s_core->cstates, tmp, report_data); + dump(ops, s_core->cstates, + NULL, + tmp, report_data); } list_for_each_entry(s_cpu, &s_core->cpu_head, list_cpu) { sprintf(tmp, "cpu%d", s_cpu->cpu_id); - dump(ops, cstate ? - (void *)s_cpu->cstates : - (void *)s_cpu->pstates, tmp, report_data); + if (cstate) + dump(ops, s_cpu->cstates, + s_cpu->base_cstates, + tmp, report_data); + else + dump(ops, s_cpu->pstates, + s_cpu->base_pstates, + tmp, report_data); } } } @@ -71,7 +71,7 @@ extern int release_cpu_topo_info(struct cpu_topology *topo); extern int output_cpu_topo_info(struct cpu_topology *topo, FILE *f); extern int establish_idledata_to_topo(struct cpuidle_datas *datas); extern int release_cpu_topo_cstates(struct cpu_topology *topo); -extern int dump_cpu_topo_info(struct report_ops *ops, void *report_data, int (*dump)(struct report_ops *, void *, char *, void *), struct cpu_topology *topo, int cstate); +extern int dump_cpu_topo_info(struct report_ops *ops, void *report_data, int (*dump)(struct report_ops *, void *, void *, char *, void *), struct cpu_topology *topo, int cstate); extern struct cpuidle_cstates *core_cluster_data(struct cpu_core *s_core); extern struct cpuidle_cstates * |