* [PATCH 1/2] perf test: fix vmlinux failure on s390x
@ 2017-09-15 7:14 Thomas Richter
2017-09-15 7:14 ` [PATCH 2/2] perf test: fix vmlinux failure on s390x part 2 Thomas Richter
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Richter @ 2017-09-15 7:14 UTC (permalink / raw)
To: linux-perf-users, acme; +Cc: =brueckner, =zvonko.kosic, Thomas Richter
On s390x perf test 1 failed. It turned out that commit 4a084ecfc821
("perf report: Fix module symbol adjustment for s390x") was incorrect.
The previous implementation in dso__load_sym() is also
suitable for s390x.
Therefore this patch undoes commit 4a084ecfc821.
Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
---
tools/perf/arch/s390/util/sym-handling.c | 8 --------
tools/perf/util/symbol-elf.c | 8 +-------
tools/perf/util/symbol.h | 3 ---
3 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/tools/perf/arch/s390/util/sym-handling.c b/tools/perf/arch/s390/util/sym-handling.c
index e103f6e..581d4c5 100644
--- a/tools/perf/arch/s390/util/sym-handling.c
+++ b/tools/perf/arch/s390/util/sym-handling.c
@@ -18,12 +18,4 @@ bool elf__needs_adjust_symbols(GElf_Ehdr ehdr)
return false;
return ehdr.e_type == ET_REL || ehdr.e_type == ET_DYN;
}
-
-void arch__adjust_sym_map_offset(GElf_Sym *sym,
- GElf_Shdr *shdr __maybe_unused,
- struct map *map)
-{
- if (map->type == MAP__FUNCTION)
- sym->st_value += map->start;
-}
#endif
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 5c39f42..9cf781f 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -810,12 +810,6 @@ static u64 ref_reloc(struct kmap *kmap)
void __weak arch__sym_update(struct symbol *s __maybe_unused,
GElf_Sym *sym __maybe_unused) { }
-void __weak arch__adjust_sym_map_offset(GElf_Sym *sym, GElf_Shdr *shdr,
- struct map *map __maybe_unused)
-{
- sym->st_value -= shdr->sh_addr - shdr->sh_offset;
-}
-
int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss,
struct symsrc *runtime_ss, int kmodule)
{
@@ -996,7 +990,7 @@ int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss,
/* Adjust symbol to map to file offset */
if (adjust_kernel_syms)
- arch__adjust_sym_map_offset(&sym, &shdr, map);
+ sym.st_value -= shdr.sh_addr - shdr.sh_offset;
if (strcmp(section_name,
(curr_dso->short_name +
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 2bd6a1f..aad99e7 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -344,9 +344,6 @@ int setup_intlist(struct intlist **list, const char *list_str,
#ifdef HAVE_LIBELF_SUPPORT
bool elf__needs_adjust_symbols(GElf_Ehdr ehdr);
void arch__sym_update(struct symbol *s, GElf_Sym *sym);
-void arch__adjust_sym_map_offset(GElf_Sym *sym,
- GElf_Shdr *shdr __maybe_unused,
- struct map *map __maybe_unused);
#endif
#define SYMBOL_A 0
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] perf test: fix vmlinux failure on s390x part 2
2017-09-15 7:14 [PATCH 1/2] perf test: fix vmlinux failure on s390x Thomas Richter
@ 2017-09-15 7:14 ` Thomas Richter
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Richter @ 2017-09-15 7:14 UTC (permalink / raw)
To: linux-perf-users, acme; +Cc: =brueckner, =zvonko.kosic, Thomas Richter
On s390x perf test 1 failed. It turned out that commit cf6383f73cf2
("perf report: Fix kernel symbol adjustment for s390x") was incorrect.
The previous implementation in dso__load_sym() is also
suitable for s390x.
Therefore this patch undoes commit cf6383f73cf2
Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
---
tools/perf/arch/s390/util/Build | 1 -
tools/perf/arch/s390/util/sym-handling.c | 21 ---------------------
2 files changed, 22 deletions(-)
delete mode 100644 tools/perf/arch/s390/util/sym-handling.c
diff --git a/tools/perf/arch/s390/util/Build b/tools/perf/arch/s390/util/Build
index bd518b6..5bd7b92 100644
--- a/tools/perf/arch/s390/util/Build
+++ b/tools/perf/arch/s390/util/Build
@@ -1,5 +1,4 @@
libperf-y += header.o
-libperf-y += sym-handling.o
libperf-y += kvm-stat.o
libperf-$(CONFIG_DWARF) += dwarf-regs.o
diff --git a/tools/perf/arch/s390/util/sym-handling.c b/tools/perf/arch/s390/util/sym-handling.c
deleted file mode 100644
index 581d4c5..0000000
--- a/tools/perf/arch/s390/util/sym-handling.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Architecture specific ELF symbol handling and relocation mapping.
- *
- * Copyright 2017 IBM Corp.
- * Author(s): Thomas Richter <tmricht@linux.vnet.ibm.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License (version 2 only)
- * as published by the Free Software Foundation.
- */
-
-#include "symbol.h"
-
-#ifdef HAVE_LIBELF_SUPPORT
-bool elf__needs_adjust_symbols(GElf_Ehdr ehdr)
-{
- if (ehdr.e_type == ET_EXEC)
- return false;
- return ehdr.e_type == ET_REL || ehdr.e_type == ET_DYN;
-}
-#endif
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-15 7:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-15 7:14 [PATCH 1/2] perf test: fix vmlinux failure on s390x Thomas Richter
2017-09-15 7:14 ` [PATCH 2/2] perf test: fix vmlinux failure on s390x part 2 Thomas Richter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).