From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932791AbcBPPsi (ORCPT ); Tue, 16 Feb 2016 10:48:38 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:49396 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932199AbcBPPsg (ORCPT ); Tue, 16 Feb 2016 10:48:36 -0500 Date: Tue, 16 Feb 2016 12:48:29 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Namhyung Kim , Jiri Olsa , lkml , David Ahern , Ingo Molnar , Peter Zijlstra Subject: Re: [PATCHv3 5/5] perf tools: Add perf data cache feature Message-ID: <20160216154829.GE17690@kernel.org> References: <1455465826-8426-1-git-send-email-jolsa@kernel.org> <1455465826-8426-6-git-send-email-jolsa@kernel.org> <20160216121130.GB27262@krava.brq.redhat.com> <20160216142219.GA6286@danjae.kornet> <20160216150143.GA7119@krava.brq.redhat.com> <20160216152936.GD17690@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160216152936.GD17690@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Feb 16, 2016 at 12:29:36PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Feb 16, 2016 at 04:01:43PM +0100, Jiri Olsa escreveu: > > + caches = zalloc(sizeof(struct cache_level) * cnt); > > + if (!caches) > > + return -1; > > + > > + for (i = 0; i < cnt; i++) { > > + struct cache_level c; > > + > > + #define _R(v) \ > > + if (readn(fd, &c.v, sizeof(u32)) != sizeof(u32))\ > > + return -1; \ > > So in this case that 'caches' variable leaks? > Ok, I fixed this and did the rename to cpu_cache_level, tested and merged it, going to the next patchkit. Thanks! Useful feature, we should use it in other places, like: record same workload in different machines, say Ivy Bridge and Broadwell, do 'perf diff' and see the CPU cache topology difference in addition to other symbolic, per DSO, etc diffs. - Arnaldo