From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752417AbcAFJgT (ORCPT ); Wed, 6 Jan 2016 04:36:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46797 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752222AbcAFJgQ (ORCPT ); Wed, 6 Jan 2016 04:36:16 -0500 Date: Wed, 6 Jan 2016 10:36:11 +0100 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , lkml , David Ahern , Ingo Molnar , Namhyung Kim , Peter Zijlstra , "Liang, Kan" Subject: Re: [PATCH 6/8] perf script: Display stat events by default Message-ID: <20160106093611.GC17939@krava.brq.redhat.com> References: <1452028152-26762-1-git-send-email-jolsa@kernel.org> <1452028152-26762-7-git-send-email-jolsa@kernel.org> <20160105224927.GG25916@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160105224927.GG25916@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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;