From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932926AbbLHEdE (ORCPT ); Mon, 7 Dec 2015 23:33:04 -0500 Received: from terminus.zytor.com ([198.137.202.10]:50737 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932556AbbLHEdC (ORCPT ); Mon, 7 Dec 2015 23:33:02 -0500 Date: Mon, 7 Dec 2015 20:32:40 -0800 From: tip-bot for Jiri Olsa Message-ID: Cc: masami.hiramatsu.pt@hitachi.com, adrian.hunter@intel.com, mingo@kernel.org, jolsa@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, acme@redhat.com, a.p.zijlstra@chello.nl, dsahern@gmail.com, wangnan0@huawei.com, hpa@zytor.com, namhyung@kernel.org Reply-To: linux-kernel@vger.kernel.org, acme@redhat.com, adrian.hunter@intel.com, masami.hiramatsu.pt@hitachi.com, mingo@kernel.org, tglx@linutronix.de, jolsa@kernel.org, wangnan0@huawei.com, hpa@zytor.com, namhyung@kernel.org, a.p.zijlstra@chello.nl, dsahern@gmail.com In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf test: Create kernel maps properly for hist entries test Git-Commit-ID: d6e94fa6b6dab4668e46665bbe766142af32cc15 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 Commit-ID: d6e94fa6b6dab4668e46665bbe766142af32cc15 Gitweb: http://git.kernel.org/tip/d6e94fa6b6dab4668e46665bbe766142af32cc15 Author: Jiri Olsa AuthorDate: Wed, 2 Dec 2015 22:08:29 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 7 Dec 2015 18:12:56 -0300 perf test: Create kernel maps properly for hist entries test It fixes segfault within machine__exit, that's caused but not creating kernel maps for machine.. We're calling machine__destroy_kernel_maps in machine__exit since commit: ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits Signed-off-by: Jiri Olsa Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: David Ahern Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/tip-k4snzv5t4dvdckggzwdzyljo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/hists_common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/perf/tests/hists_common.c b/tools/perf/tests/hists_common.c index ce80b27..46f453b 100644 --- a/tools/perf/tests/hists_common.c +++ b/tools/perf/tests/hists_common.c @@ -87,6 +87,11 @@ struct machine *setup_fake_machine(struct machines *machines) return NULL; } + if (machine__create_kernel_maps(machine)) { + pr_debug("Not enough memory for machine setup\n"); + goto out; + } + for (i = 0; i < ARRAY_SIZE(fake_threads); i++) { struct thread *thread;