From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753917AbbICKBm (ORCPT ); Thu, 3 Sep 2015 06:01:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48491 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752101AbbICKBl (ORCPT ); Thu, 3 Sep 2015 06:01:41 -0400 Date: Thu, 3 Sep 2015 12:01:34 +0200 From: Jiri Olsa To: Stephane Eranian Cc: linux-kernel@vger.kernel.org, acme@redhat.com, peterz@infradead.org, mingo@elte.hu, ak@linux.intel.com, namhyung@kernel.org, kan.liang@intel.com, dsahern@gmail.com, adrian.hunter@intel.com Subject: Re: [PATCH] perf stat: fix per-pkg event reporting bug Message-ID: <20150903100134.GD13114@krava.redhat.com> References: <1441199871-7384-1-git-send-email-eranian@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1441199871-7384-1-git-send-email-eranian@google.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 02, 2015 at 03:17:51PM +0200, Stephane Eranian wrote: SNIP > + /* > + * we do not consider an event that has not run as a good > + * instance to mark a package as used (skip=1). Otherwise > + * we may run into a situation where the first CPU in a package > + * is not running anything, yet the second is, and this function > + * would mark the package as used after the first CPU and would > + * not read the values from the second CPU. > + */ > + if (!(vals->run && vals->ena)) > + return 0; > + > s = cpu_map__get_socket(cpus, cpu); > if (s < 0) > return -1; > @@ -235,7 +247,7 @@ process_counter_values(struct perf_stat_config *config, struct perf_evsel *evsel > static struct perf_counts_values zero; > bool skip = false; > > - if (check_per_pkg(evsel, cpu, &skip)) { > + if (check_per_pkg(evsel, aggr, cpu, &skip)) { should we pass 'count' instead o 'aggr' ? jirka