Messages in this thread Patch in this message | | | Date | Wed, 6 Jan 2016 10:36:11 +0100 | From | Jiri Olsa <> | Subject | Re: [PATCH 6/8] perf script: Display stat events by default |
| |
On Tue, Jan 05, 2016 at 07:49:27PM -0300, Arnaldo Carvalho de Melo wrote:
SNIP
> [acme@zoo linux]$ > [acme@zoo linux]$ perf script > CPU THREAD VAL ENA RUN TIME EVENT > 65535 4883 356474 356474 356474 690200 task-clock > 65535 4883 1 356474 356474 690200 context-switches > 65535 4883 0 356474 356474 690200 cpu-migrations > 65535 4883 54 356474 356474 690200 page-faults > 65535 4883 1044123 360329 360329 690200 cycles > 65535 4883 716911 360329 360329 690200 stalled-cycles-frontend > 65535 4883 0 0 0 690200 stalled-cycles-backend > 65535 4883 694609 360329 360329 690200 instructions > 65535 4883 140037 360329 360329 690200 branches > 65535 4883 7920 360329 360329 690200 branch-misses > [acme@zoo linux]$
there's wrong conversion from u16 (-1) cpu data to int cpu_map->map[0]
attached patch fixes that for me, not sure why I did not see that before.. I'll send new version shortly
thanks, jirka
--- diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c index a0717b93d8f5..581aec244ac1 100644 --- a/tools/perf/util/cpumap.c +++ b/tools/perf/util/cpumap.c @@ -189,7 +189,7 @@ static struct cpu_map *cpu_map__from_entries(struct cpu_map_entries *cpus) unsigned i; for (i = 0; i < cpus->nr; i++) - map->map[i] = (int)cpus->cpu[i]; + map->map[i] = (int)(s16)cpus->cpu[i]; } return map;
| |