Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp70445imm; Wed, 5 Sep 2018 15:10:13 -0700 (PDT) X-Google-Smtp-Source: ANB0VdatIePuoNOL342UgJEBCRRu0QUDYOkgiUgPKjWyZW6JajI/NnLKGdbwhLZZkZbawH0E6V8T X-Received: by 2002:a17:902:9696:: with SMTP id n22-v6mr41592716plp.212.1536185413599; Wed, 05 Sep 2018 15:10:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536185413; cv=none; d=google.com; s=arc-20160816; b=sQlq+5PhdZyqGjs7ft6w2iMcjNgC32P3VEForm/6yUkqelA7gqmadLXljHmuOC7813 FKf5HqmeTKxE0lqHrArNazz4vCc2bjWpZU1YR3fyNa8fuVUXkNtF1nZpzZwyYx5LULAh eO/qcrVTnh8cZL4wOR6Bj4Q3qZFlDjjKIohQQa42gBBpIN2TcQJDDcI3n0S1nr0DuO84 2XQMTYnwKK1ZMbgiAURTnheqADla83a7BaLlr+xn1kOPXLJqPQIKMB/ccMWw2kQgac4X bNJDDN7vRwS0V903gmwCwtOJhUVRDJXPjQjMqKVlL2mbvet6j2litb5qoLmR5RyfSZJU 8IFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=/nLKz2dGzmvUURiw5qFkzPPpqBxTLl5y97qcypUfInI=; b=sHMdjroJ6/a1o11tAL+gFJAfAaDhPOf5bWohtdcgEy8mBWkmJKWSxmN4ZAHLrU+6B8 EspDmoKnLHcykvigEXyPRIOIGqzsAulauqPWyC45NoxqxZYsdmVbjvFDKblFDrz0nWul v3DGqR1eaRogiyQgFeeat91UgSCelO4H2Gy26radzIUjmmSzRKHWrbdnJv6iLsW7zZpW 2WurmY2vklWQvEKUmuK0fS2hq1v/WkSZVLVZtZO28vw6mAppIUKWZPQ93Fu/sM24GwsG Tf3AmvLoeGMIRAYkC7QBW8I6LXsMHImX+1bk59yuozQGptQf050dqNGfCsCbWTHdEZu9 D5rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UumiMonU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a190-v6si3305073pgc.241.2018.09.05.15.09.58; Wed, 05 Sep 2018 15:10:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UumiMonU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728862AbeIFCjg (ORCPT + 99 others); Wed, 5 Sep 2018 22:39:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:54434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727593AbeIFCje (ORCPT ); Wed, 5 Sep 2018 22:39:34 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B600620652; Wed, 5 Sep 2018 22:07:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536185243; bh=5ooDqUzQecIpxBf6wmTLOb0cskkU5yY0uK1+LyaGjbM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UumiMonUpnLxA2OISaYDg8ym7A7fx/rOu5bBpcbYRku2fhnq5cIOzHf7QtBgnJ18Q QQrwYVoMeD9nHLbqeU/nrFGcO5xN3PRCQuDyWNlJ8Vwd1tHFS0kjFY9IqPG6xKxagR xYgLUp1cQG0CWhQlgYzZxDYDznu5YcfRvD7E9Y3E= From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Jiri Olsa , Alexander Shishkin , Andi Kleen , David Ahern , Namhyung Kim , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: [PATCH 55/77] perf stat: Pass 'evlist' to aggr_update_shadow() Date: Wed, 5 Sep 2018 19:04:18 -0300 Message-Id: <20180905220440.20256-56-acme@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180905220440.20256-1-acme@kernel.org> References: <20180905220440.20256-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiri Olsa Pass a 'evlist' argument to aggr_update_shadow(), to get rid of the global 'evsel_list' variable dependency. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-31-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-stat.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index f5ac6545af34..2711d8f6e4b8 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -1099,7 +1099,8 @@ static void printout(struct perf_stat_config *config, int id, int nr, } } -static void aggr_update_shadow(struct perf_stat_config *config) +static void aggr_update_shadow(struct perf_stat_config *config, + struct perf_evlist *evlist) { int cpu, s2, id, s; u64 val; @@ -1107,7 +1108,7 @@ static void aggr_update_shadow(struct perf_stat_config *config) for (s = 0; s < aggr_map->nr; s++) { id = aggr_map->map[s]; - evlist__for_each_entry(evsel_list, counter) { + evlist__for_each_entry(evlist, counter) { val = 0; for (cpu = 0; cpu < perf_evsel__nr_cpus(counter); cpu++) { s2 = aggr_get_id(evsel_list->cpus, cpu); @@ -1238,7 +1239,7 @@ static void print_aggr(struct perf_stat_config *config, if (!(aggr_map || aggr_get_id)) return; - aggr_update_shadow(config); + aggr_update_shadow(config, evlist); /* * With metric_only everything is on a single line. -- 2.14.4