Messages in this thread | | | Date | Thu, 24 Sep 2009 15:51:08 +0200 | From | Arjan van de Ven <> | Subject | Re: [patch] perf timechart: Add a power-only mode |
| |
On Thu, 24 Sep 2009 15:47:01 +0200 Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > - for (cpu = 0; cpu < numcpus; cpu++) { > > + for (cpu = 0; cpu <= numcpus; cpu++) { > > hmm, why test is now "cpu <= numcpus" ?
at this point numcpus is the highest number cpu... and the graph would miss the "closing" frequency.
> > fopen("/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies", > > "r"); > > if this cpu is offline
1) taking cpu 0 offline is stupid ;-) (really, don't do that, there's only bad things to come from it) 2) if that file does not exist the fallback is graceful, we just use the highest frequency we saw in the trace instead.
> > /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies: > No such file or directory
-- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org
| |