From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752973AbbCIIMT (ORCPT ); Mon, 9 Mar 2015 04:12:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6730 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752926AbbCIIMR (ORCPT ); Mon, 9 Mar 2015 04:12:17 -0400 Date: Mon, 9 Mar 2015 09:11:58 +0100 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH 3/4] perf, tools, stat: Fix IPC and other formulas with -A Message-ID: <20150309081158.GC27885@krava.brq.redhat.com> References: <1425858924-31414-1-git-send-email-andi@firstfloor.org> <1425858924-31414-4-git-send-email-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1425858924-31414-4-git-send-email-andi@firstfloor.org> 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 Sun, Mar 08, 2015 at 04:55:23PM -0700, Andi Kleen wrote: SNIP > - update_stats(&runtime_dtlb_cache_stats[ctx][0], count[0]); > + update_stats(&runtime_dtlb_cache_stats[ctx][cpu], count[0]); > else if (perf_evsel__match(counter, HW_CACHE, HW_CACHE_ITLB)) > - update_stats(&runtime_itlb_cache_stats[ctx][0], count[0]); > + update_stats(&runtime_itlb_cache_stats[ctx][cpu], count[0]); > } > > static void zero_per_pkg(struct perf_evsel *counter) > @@ -463,7 +464,8 @@ static int read_cb(struct perf_evsel *evsel, int cpu, int thread __maybe_unused, > perf_evsel__compute_deltas(evsel, cpu, count); > perf_counts_values__scale(count, scale, NULL); > evsel->counts->cpu[cpu] = *count; > - update_shadow_stats(evsel, count->values); > + if (aggr_mode == AGGR_NONE) > + update_shadow_stats(evsel, count->values, cpu); this will also prevent the 'socket' and 'core' aggregation not to print bogus data for socket/core cpu 0, we'll need to aggregate shadow stats first to support that.. anyway: Acked-by: Jiri Olsa thanks, jirka