From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933472AbdK1LM6 (ORCPT ); Tue, 28 Nov 2017 06:12:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34144 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754413AbdK1LMU (ORCPT ); Tue, 28 Nov 2017 06:12:20 -0500 Date: Tue, 28 Nov 2017 12:12:16 +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 v2 07/10] perf stat: Allocate shadow stats buffer for threads Message-ID: <20171128111216.GA2732@krava> References: <1511791650-24072-1-git-send-email-yao.jin@linux.intel.com> <1511791650-24072-8-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: <1511791650-24072-8-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.31]); Tue, 28 Nov 2017 11:12:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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