From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753860AbdK1MXY (ORCPT ); Tue, 28 Nov 2017 07:23:24 -0500 Received: from mga14.intel.com ([192.55.52.115]:17200 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753510AbdK1MXV (ORCPT ); Tue, 28 Nov 2017 07:23:21 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,468,1505804400"; d="scan'208";a="1249446117" Subject: Re: [PATCH v2 07/10] perf stat: Allocate shadow stats buffer for threads 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: <1511791650-24072-1-git-send-email-yao.jin@linux.intel.com> <1511791650-24072-8-git-send-email-yao.jin@linux.intel.com> <20171128111216.GA2732@krava> From: "Jin, Yao" Message-ID: <7e890f93-a688-c2d5-4b0c-18801d15a274@linux.intel.com> Date: Tue, 28 Nov 2017 20:23:14 +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: <20171128111216.GA2732@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/28/2017 7:12 PM, Jiri Olsa wrote: > On Mon, Nov 27, 2017 at 10:07:27PM +0800, Jin Yao wrote: >> After perf_evlist__create_maps() being executed, we can get all >> threads from /proc. And via thread_map__nr(), we can also get >> the number of threads. >> >> With the number of threads, the patch allocates a buffer which >> will record the shadow stats for these threads. >> >> The buffer pointer is saved in stat_config. > > why don't you add struct perf_stat_config::*stats|stats_num in this patch? > I dont see any reason it's introduced earlier > > jirka > OK, let me check it. Thanks Jin Yao