Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1225317

[PATCH 1/8] perf probe: Free perf_probe_event in cleanup_perf_probe_events()

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 1/8] perf probe: Free perf_probe_event in cleanup_perf_probe_events()
Date 2015-09-15 17:40 +0200
Message-ID <q90uR-xv-1@gated-at.bofh.it> (permalink)
References <q90lc-mc-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Namhyung Kim <namhyung@kernel.org>

The cleanup_perf_probe_events() frees all resources related to a perf
probe event.  However it only freed resources in trace probe events, not
perf probe events.  So call clear_perf_probe_event() too.

Reported-by: Wang Nan <wangnan0@huawei.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1441852026-28974-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-event.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 5964eccbe94d..3d7d60cc6f16 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -2792,6 +2792,7 @@ void cleanup_perf_probe_events(struct perf_probe_event *pevs, int npevs)
 			clear_probe_trace_event(&pevs[i].tevs[j]);
 		zfree(&pevs[i].tevs);
 		pevs[i].ntevs = 0;
+		clear_perf_probe_event(&pevs[i]);
 	}
 
 	exit_symbol_maps();
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL 0/8] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-15 17:30 +0200
  [PATCH 5/8] perf evsel: Propagate error info from tp_format Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-15 17:30 +0200
  [PATCH 1/8] perf probe: Free perf_probe_event in cleanup_perf_probe_events() Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-15 17:40 +0200
  [PATCH 4/8] perf tools: Propagate error info for the tracepoint parsing Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-15 17:40 +0200
  [PATCH 3/8] tools: Add err.h with ERR_PTR PTR_ERR interface Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-15 17:40 +0200
  [PATCH 2/8] perf probe: Export init/exit_probe_symbol_maps() Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-15 17:40 +0200
  Re: [GIT PULL 0/8] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-09-16 09:30 +0200
    Re: [GIT PULL 0/8] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-16 16:00 +0200

csiph-web