Re: [PATCH 3/4] perf, tools, stat: Fix IPC and other formulas with -A
From: Jiri Olsa
Date: Mon Mar 09 2015 - 04:12:22 EST
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 <jolsa@xxxxxxxxxx>
thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/