Hi, On Tue, Oct 7, 2014 at 12:49 PM, Howard Chen <howard.c...@linaro.org> wrote: > Currently only the c-state is showing the cpu topology when displaying the > results. For the sake of consistency, we should also give the topology for > the p-states and the wakeups array. > > Before: > -------------------------------------------- > | Wakeup | # | Name | Count | > -------------------------------------------- > | cpu0 | > -------------------------------------------- > | ipi | --- | RESCHEDULE | 1 | > | irq | 100 | ahci | 4 | > -------------------------------------------- > | cpu1 | > -------------------------------------------- > | irq | 130 | eth1-TxRx-1 | 3 | > | irq | 111 | eth0-TxRx-0 | 2 | > | ipi | --- | CALL_FUNCTION | 1 | > > After: > -------------------------------------------- > | Wakeup | # | Name | Count | > -------------------------------------------- > | clusterA | > --------------------------------------------
We're still missing core headers for HT processors. That is an easy fix to do, I can add it. As a related side note, we are getting somewhat spammy here. I wonder if we should suppress the cluster/core headers when there is only one cluster and/or core. That can of course be another patch on top of this one and should affect C-state output as well. Tuukka > | cpu0 | > -------------------------------------------- > | ipi | --- | RESCHEDULE | 1 | > | irq | 100 | ahci | 4 | > -------------------------------------------- > | cpu1 | > -------------------------------------------- > | irq | 130 | eth1-TxRx-1 | 3 | > | irq | 111 | eth0-TxRx-0 | 2 | > | ipi | --- | CALL_FUNCTION | 1 | > > Fix this by add display_cpu_header for other cases instead of CPUs only. > > Signed-off-by: Howard Chen <howard.c...@linaro.org> > --- > idlestat.c | 6 ++++++ > topology.c | 3 +-- > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/idlestat.c b/idlestat.c > index da615cb..e609e86 100644 > --- a/idlestat.c > +++ b/idlestat.c > @@ -242,6 +242,10 @@ static int display_pstates(void *arg, char *cpu) > bool cpu_header = false; > struct cpufreq_pstates *pstates = arg; > > + if(!strstr(cpu, "cpu")){ > + display_cpu_header(cpu, 64); > + return 0; > + } > for (i = 0; i < pstates->max; i++) { > > struct cpufreq_pstate *p = &(pstates->pstate[i]); > @@ -299,6 +303,8 @@ static int display_wakeup(void *arg, char *cpu) > struct wakeup_info *wakeinfo = &cstates->wakeinfo; > struct wakeup_irq *irqinfo = wakeinfo->irqinfo; > > + if(!strstr(cpu, "cpu")) > + display_cpu_header(cpu, 44); > for (i = 0; i < wakeinfo->nrdata; i++, irqinfo++) { > > if (!cpu_header) { > diff --git a/topology.c b/topology.c > index 92521e1..47c6983 100644 > --- a/topology.c > +++ b/topology.c > @@ -458,8 +458,7 @@ int dump_cpu_topo_info(int (*dump)(void *, char *), int > cstate) > > sprintf(tmp, "cluster%c", s_phy->physical_id + 'A'); > > - if (cstate) > - dump(s_phy->cstates, tmp); > + dump(s_phy->cstates, tmp); > > list_for_each_entry(s_core, &s_phy->core_head, list_core) { > if (s_core->is_ht && cstate) { > -- > 1.9.1 > _______________________________________________ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev