From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932549AbdK2PQm (ORCPT ); Wed, 29 Nov 2017 10:16:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58272 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751846AbdK2PQl (ORCPT ); Wed, 29 Nov 2017 10:16:41 -0500 Date: Wed, 29 Nov 2017 16:16:37 +0100 From: Jiri Olsa To: Jin Yao Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com Subject: Re: [PATCH v3 00/11] perf stat: Enable '--per-thread' on all thread Message-ID: <20171129151637.GA15069@krava> References: <1511957158-5813-1-git-send-email-yao.jin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1511957158-5813-1-git-send-email-yao.jin@linux.intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 29 Nov 2017 15:16:41 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 29, 2017 at 08:05:47PM +0800, Jin Yao wrote: > v3: > --- > Update according to Jiri's comments. The major modifications are: > > 1. Fix the crash issue when performing the git bisect. > Move the removing of runtime_saved_values to the switching point > (perf util: Remove a set of shadow stats static variables). > > 2. Still add struct perf_stat_config::*stats|stats_num in earlier > patch because 'stats' will be used in > 'perf util: Update and print per-thread shadow stats'. > If it's moved to 'perf stat: Allocate shadow stats buffer for threads', > the compilation would be failed. sure, that's why also that hunk from 'perf util: Update and print per-thread shadow stats' needs to be moved to 'perf stat: Allocate shadow stats buffer for threads' this one: + if (stat_config.stats) + stat = &stat_config.stats[thread]; + else + stat = &rt_stat; + + printout(thread, 0, counter, uval, prefix, run, ena, 1.0, + stat); you already did that in 'perf stat: Allocate shadow stats buffer for threads' for: + if (config->aggr_mode == AGGR_THREAD) { + if (config->stats) + perf_stat__update_shadow_stats(evsel, + count->val, 0, &config->stats[thread]); + else + perf_stat__update_shadow_stats(evsel, + count->val, 0, &rt_stat); + } thanks, jirka