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


Groups > linux.kernel > #1660859

[PATCH v4 8/9] perf symbols: Keep DSO->symtab_type after decompress

From Namhyung Kim <namhyung@kernel.org>
Newsgroups linux.kernel
Subject [PATCH v4 8/9] perf symbols: Keep DSO->symtab_type after decompress
Date 2017-06-08 09:40 +0200
Message-ID <tQ0cX-1hd-55@gated-at.bofh.it> (permalink)
References <tQ0cV-1hd-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <namhyung@kernel.org>
---
 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 d342e771dbad..502505cf236a 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) {
-- 
2.13.1

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


Thread

[PATCHSET 0/9] perf tools: Fix for compressed kernel modules (v4) Namhyung Kim <namhyung@kernel.org> - 2017-06-08 09:40 +0200
  [PATCH v4 3/9] perf tools: Introduce dso__decompress_kmodule_{fd,path} Namhyung Kim <namhyung@kernel.org> - 2017-06-08 09:40 +0200
    [tip:perf/urgent] perf tools: Introduce  dso__decompress_kmodule_{fd,path} tip-bot for Namhyung Kim <tipbot@zytor.com> - 2017-06-09 01:00 +0200
  [PATCH v4 7/9] perf test: Decompress kernel module before objdump Namhyung Kim <namhyung@kernel.org> - 2017-06-08 09:40 +0200
    Re: [PATCH v4 7/9] perf test: Decompress kernel module before objdump Adrian Hunter <adrian.hunter@intel.com> - 2017-06-08 09:50 +0200
    [tip:perf/urgent] perf tests: Decompress kernel module before  objdump tip-bot for Namhyung Kim <tipbot@zytor.com> - 2017-06-09 01:00 +0200
  [PATCH v4 9/9] perf symbols: Kill dso__build_id_is_kmod() Namhyung Kim <namhyung@kernel.org> - 2017-06-08 09:40 +0200
    [tip:perf/urgent] perf symbols: Kill dso__build_id_is_kmod() tip-bot for Namhyung Kim <tipbot@zytor.com> - 2017-06-09 01:00 +0200
  [PATCH v4 4/9] perf annotate: Use dso__decompress_kmodule_path() Namhyung Kim <namhyung@kernel.org> - 2017-06-08 09:40 +0200
    [tip:perf/urgent] perf annotate: Use dso__decompress_kmodule_path() tip-bot for Namhyung Kim <tipbot@zytor.com> - 2017-06-09 01:00 +0200
  [PATCH v4 6/9] perf tools: Consolidate error path in __open_dso() Namhyung Kim <namhyung@kernel.org> - 2017-06-08 09:40 +0200
    [tip:perf/urgent] perf tools: Consolidate error path in  __open_dso() tip-bot for Namhyung Kim <tipbot@zytor.com> - 2017-06-09 01:00 +0200
  [PATCH v4 8/9] perf symbols: Keep DSO->symtab_type after decompress Namhyung Kim <namhyung@kernel.org> - 2017-06-08 09:40 +0200
    [tip:perf/urgent] perf symbols: Keep DSO->symtab_type after  decompress tip-bot for Namhyung Kim <tipbot@zytor.com> - 2017-06-09 01:00 +0200
  Re: [PATCHSET 0/9] perf tools: Fix for compressed kernel modules (v4) Jiri Olsa <jolsa@redhat.com> - 2017-06-08 14:20 +0200

csiph-web