From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755283AbcCBMMs (ORCPT ); Wed, 2 Mar 2016 07:12:48 -0500 Received: from mail.kernel.org ([198.145.29.136]:44548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753827AbcCBMMr (ORCPT ); Wed, 2 Mar 2016 07:12:47 -0500 Date: Wed, 2 Mar 2016 09:12:42 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Andi Kleen , jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH] perf, tools, stat: Avoid crash with --per-thread Message-ID: <20160302121242.GG3604@kernel.org> References: <1456875157-23263-1-git-send-email-andi@firstfloor.org> <20160302063659.GA7272@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160302063659.GA7272@krava> X-Url: http://acmel.wordpress.com 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 Em Wed, Mar 02, 2016 at 07:36:59AM +0100, Jiri Olsa escreveu: > On Tue, Mar 01, 2016 at 03:32:37PM -0800, Andi Kleen wrote: > > From: Andi Kleen > > > > Bug fix: > > > > The earlier metrics changes broke --per-thread causing a segfault. > > Handle this case correctly. We actually don't print metrics > > in per thread mode, so using a 0 shadow CPU is fine. > > right, so --per-thread paths go through perf_stat__print_shadow_stats > but never actually collect shadow data, so it does not print anything > > we would need somehow map each thread to the shadow cpu.. I'll try > to come up with something.. however: > > Acked-by: Jiri Olsa Kept the ack for the previous commit ("Support metrics in --per-core/socket mode") > > Could be folded into > > "perf, tools, stat: Support metrics in --per-core/socket mode" And used 'git rebase --interactive' to 'fixup' this into it, i.e. do what Andi suggested to avoid breaking the 'perf stat --per-thread' bisection since this one hasn't been pushed to Ingo yet. Thanks, - Arnaldo