From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753381AbdK3AUV (ORCPT ); Wed, 29 Nov 2017 19:20:21 -0500 Received: from mga11.intel.com ([192.55.52.93]:55907 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752716AbdK3AUU (ORCPT ); Wed, 29 Nov 2017 19:20:20 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,339,1508828400"; d="scan'208";a="1250088577" Subject: Re: [PATCH v3 00/11] perf stat: Enable '--per-thread' on all thread To: Jiri Olsa 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 References: <1511957158-5813-1-git-send-email-yao.jin@linux.intel.com> <20171129151637.GA15069@krava> From: "Jin, Yao" Message-ID: <05809a8a-76f1-8777-d83b-e2d285964d82@linux.intel.com> Date: Thu, 30 Nov 2017 08:20:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171129151637.GA15069@krava> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/29/2017 11:16 PM, Jiri Olsa wrote: > 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 > OK, I will move this code from 'perf util: Update and print per-thread shadow stats' to 'perf stat: Allocate shadow stats buffer for threads'. And I will also add struct perf_stat_config::*stats|stats_num in 'perf stat: Allocate shadow stats buffer for threads'. I will send v4 soon. Thanks Jin Yao