From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752077AbdFHWzg (ORCPT ); Thu, 8 Jun 2017 18:55:36 -0400 Received: from terminus.zytor.com ([65.50.211.136]:34671 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751591AbdFHWzf (ORCPT ); Thu, 8 Jun 2017 18:55:35 -0400 Date: Thu, 8 Jun 2017 15:53:21 -0700 From: tip-bot for Namhyung Kim Message-ID: Cc: wangnan0@huawei.com, a.p.zijlstra@chello.nl, jolsa@kernel.org, mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, dsahern@gmail.com, acme@redhat.com, adrian.hunter@intel.com, hpa@zytor.com, namhyung@kernel.org Reply-To: hpa@zytor.com, namhyung@kernel.org, adrian.hunter@intel.com, dsahern@gmail.com, acme@redhat.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, a.p.zijlstra@chello.nl, jolsa@kernel.org, wangnan0@huawei.com In-Reply-To: <20170608073109.30699-9-namhyung@kernel.org> References: <20170608073109.30699-9-namhyung@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf symbols: Keep DSO->symtab_type after decompress Git-Commit-ID: c25ec42f846f702f8f532fbc890171e3a1f6ec85 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: c25ec42f846f702f8f532fbc890171e3a1f6ec85 Gitweb: http://git.kernel.org/tip/c25ec42f846f702f8f532fbc890171e3a1f6ec85 Author: Namhyung Kim AuthorDate: Thu, 8 Jun 2017 16:31:08 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 8 Jun 2017 15:39:26 -0300 perf symbols: Keep DSO->symtab_type after decompress The symsrc__init() overwrites dso->symtab_type as symsrc->type in dso__load_sym(). But for compressed kernel modules in the build-id cache, it should have original symtab type to be decompressed as needed. This fixes perf annotate to show disassembly of the function properly. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Peter Zijlstra Cc: Wang Nan Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170608073109.30699-9-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/symbol-elf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index d342e77..502505c 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -671,6 +671,8 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name, fd = dso__decompress_kmodule_fd(dso, name); if (fd < 0) return -1; + + type = dso->symtab_type; } else { fd = open(name, O_RDONLY); if (fd < 0) {