Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752740AbbKWQLs (ORCPT ); Mon, 23 Nov 2015 11:11:48 -0500 Received: from terminus.zytor.com ([198.137.202.10]:43934 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751200AbbKWQLq (ORCPT ); Mon, 23 Nov 2015 11:11:46 -0500 Date: Mon, 23 Nov 2015 08:11:30 -0800 From: tip-bot for Masami Hiramatsu Message-ID: Cc: a.p.zijlstra@chello.nl, tglx@linutronix.de, acme@redhat.com, masami.hiramatsu.pt@hitachi.com, jolsa@redhat.com, linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com, namhyung@kernel.org, adrian.hunter@intel.com Reply-To: tglx@linutronix.de, a.p.zijlstra@chello.nl, masami.hiramatsu.pt@hitachi.com, acme@redhat.com, linux-kernel@vger.kernel.org, jolsa@redhat.com, namhyung@kernel.org, adrian.hunter@intel.com, hpa@zytor.com, mingo@kernel.org In-Reply-To: <20151118064024.30709.43577.stgit@localhost.localdomain> References: <20151118064024.30709.43577.stgit@localhost.localdomain> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf machine: Fix to destroy kernel maps when machine exits Git-Commit-ID: ebe9729c8c3171aa46ad5d7af40acdc29806689d X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2331 Lines: 70 Commit-ID: ebe9729c8c3171aa46ad5d7af40acdc29806689d Gitweb: http://git.kernel.org/tip/ebe9729c8c3171aa46ad5d7af40acdc29806689d Author: Masami Hiramatsu AuthorDate: Wed, 18 Nov 2015 15:40:24 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 19 Nov 2015 13:19:19 -0300 perf machine: Fix to destroy kernel maps when machine exits Actually machine__exit forgot to call machine__destroy_kernel_maps. This fixes some memory leaks on map as below. Without this fix. ---- ./perf probe vfs_read Added new event: probe:vfs_read (on vfs_read) You can now use it in all perf tools, such as: perf record -e probe:vfs_read -aR sleep 1 REFCNT: BUG: Unreclaimed objects found. REFCNT: Total 4 objects are not reclaimed. To see all backtraces, rerun with -v option ---- With this fix. ---- ./perf probe vfs_read Added new event: probe:vfs_read (on vfs_read) You can now use it in all perf tools, such as: perf record -e probe:vfs_read -aR sleep 1 REFCNT: BUG: Unreclaimed objects found. REFCNT: Total 2 objects are not reclaimed. To see all backtraces, rerun with -v option ---- Signed-off-by: Masami Hiramatsu Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20151118064024.30709.43577.stgit@localhost.localdomain Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/machine.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index e9e09be..a358771 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -122,6 +122,7 @@ void machine__delete_threads(struct machine *machine) void machine__exit(struct machine *machine) { + machine__destroy_kernel_maps(machine); map_groups__exit(&machine->kmaps); dsos__exit(&machine->dsos); machine__exit_vdso(machine); -- 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/