From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756724AbcAIQly (ORCPT ); Sat, 9 Jan 2016 11:41:54 -0500 Received: from terminus.zytor.com ([198.137.202.10]:42379 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755939AbcAIQlw (ORCPT ); Sat, 9 Jan 2016 11:41:52 -0500 Date: Sat, 9 Jan 2016 08:41:36 -0800 From: tip-bot for Jiri Olsa Message-ID: Cc: noelgrandin@gmail.com, tglx@linutronix.de, mingo@kernel.org, namhyung@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl, dsahern@gmail.com, acme@redhat.com, hpa@zytor.com Reply-To: linux-kernel@vger.kernel.org, adrian.hunter@intel.com, jolsa@kernel.org, namhyung@kernel.org, mingo@kernel.org, tglx@linutronix.de, noelgrandin@gmail.com, hpa@zytor.com, acme@redhat.com, dsahern@gmail.com, a.p.zijlstra@chello.nl In-Reply-To: <1452158050-28061-5-git-send-email-jolsa@kernel.org> References: <1452158050-28061-5-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf unwind: Check for mmaps also in MAP__VARIABLE tree Git-Commit-ID: 0ddf5246f70ecc04e1bb4c4dc2be65977d1c03a7 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: 0ddf5246f70ecc04e1bb4c4dc2be65977d1c03a7 Gitweb: http://git.kernel.org/tip/0ddf5246f70ecc04e1bb4c4dc2be65977d1c03a7 Author: Jiri Olsa AuthorDate: Thu, 7 Jan 2016 10:14:01 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 8 Jan 2016 14:16:34 -0300 perf unwind: Check for mmaps also in MAP__VARIABLE tree We've seen cases (softice) where DWARF unwinder went through non executable mmaps, which we need to lookup in MAP__VARIABLE tree. Reported-and-Tested-by: Noel Grandin Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452158050-28061-5-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/unwind-libunwind.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c index f37859c..ee7e372 100644 --- a/tools/perf/util/unwind-libunwind.c +++ b/tools/perf/util/unwind-libunwind.c @@ -319,6 +319,15 @@ static struct map *find_map(unw_word_t ip, struct unwind_info *ui) thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER, MAP__FUNCTION, ip, &al); + if (!al.map) { + /* + * We've seen cases (softice) where DWARF unwinder went + * through non executable mmaps, which we need to lookup + * in MAP__VARIABLE tree. + */ + thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER, + MAP__VARIABLE, ip, &al); + } return al.map; }