All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 1/9] perf tools: Free memory nodes data
Date: Fri,  9 Mar 2018 11:14:34 +0100	[thread overview]
Message-ID: <20180309101442.9224-2-jolsa@kernel.org> (raw)
In-Reply-To: <20180309101442.9224-1-jolsa@kernel.org>

Forgot to free env's memory nodes, adding
needed code to perf_env__exit.

Link: http://lkml.kernel.org/n/tip-ryyndcxqisxtfhbr6zp54jcy@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/env.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c
index 6d311868d850..4c842762e3f2 100644
--- a/tools/perf/util/env.c
+++ b/tools/perf/util/env.c
@@ -32,6 +32,10 @@ void perf_env__exit(struct perf_env *env)
 	for (i = 0; i < env->caches_cnt; i++)
 		cpu_cache_level__free(&env->caches[i]);
 	zfree(&env->caches);
+
+	for (i = 0; i < env->nr_memory_nodes; i++)
+		free(env->memory_nodes[i].set);
+	zfree(&env->memory_nodes);
 }
 
 int perf_env__set_cmdline(struct perf_env *env, int argc, const char *argv[])
-- 
2.13.6

  reply	other threads:[~2018-03-09 10:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 10:14 [PATCHv2 0/9] perf tools: Assorted fixes Jiri Olsa
2018-03-09 10:14 ` Jiri Olsa [this message]
2018-03-20  6:16   ` [tip:perf/core] perf env: Free memory nodes data tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 2/9] perf tools: Add mem2node object Jiri Olsa
2018-03-20  6:16   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 3/9] perf tests: Add mem2node object test Jiri Olsa
2018-03-20  6:17   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 4/9] perf c2c record: Record physical addresses in samples Jiri Olsa
2018-03-20  6:17   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 5/9] perf c2c report: Make calc_width work with struct c2c_hist_entry Jiri Olsa
2018-03-20  6:18   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 6/9] perf c2c report: Call calc_width only for displayed entries Jiri Olsa
2018-03-20  6:18   ` [tip:perf/core] perf c2c report: Call calc_width() " tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 7/9] perf c2c report: Display node for cacheline address Jiri Olsa
2018-03-20  6:19   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 8/9] perf c2c report: Add span header over cacheline data Jiri Olsa
2018-03-20  6:19   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 9/9] perf c2c report: Add cacheline address count column Jiri Olsa
2018-03-09 14:56   ` Arnaldo Carvalho de Melo
2018-03-09 16:28     ` Jiri Olsa
2018-03-09 17:34       ` Arnaldo Carvalho de Melo
2018-03-20  6:20   ` [tip:perf/core] " tip-bot for Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180309101442.9224-2-jolsa@kernel.org \
    --to=jolsa@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.