Skip to content

Commit a5d20d4

Browse files
namhyungacmel
authored andcommitted
perf symbol: Remove arch__symbols__fixup_end()
Now the generic code can handle kallsyms fixup properly so no need to keep the arch-functions anymore. Fixes: 3cf6a32 ("perf symbols: Fix symbol size calculation condition") Signed-off-by: Namhyung Kim <[email protected]> Acked-by: Ian Rogers <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: John Garry <[email protected]> Cc: Leo Yan <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Mathieu Poirier <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Michael Petlan <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Song Liu <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 8799ebc commit a5d20d4

File tree

6 files changed

+0
-69
lines changed

6 files changed

+0
-69
lines changed

tools/perf/arch/arm64/util/machine.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,6 @@
88
#include "callchain.h"
99
#include "record.h"
1010

11-
/* On arm64, kernel text segment starts at high memory address,
12-
* for example 0xffff 0000 8xxx xxxx. Modules start at a low memory
13-
* address, like 0xffff 0000 00ax xxxx. When only small amount of
14-
* memory is used by modules, gap between end of module's text segment
15-
* and start of kernel text segment may reach 2G.
16-
* Therefore do not fill this gap and do not assign it to the kernel dso map.
17-
*/
18-
19-
#define SYMBOL_LIMIT (1 << 12) /* 4K */
20-
21-
void arch__symbols__fixup_end(struct symbol *p, struct symbol *c)
22-
{
23-
if ((strchr(p->name, '[') && strchr(c->name, '[') == NULL) ||
24-
(strchr(p->name, '[') == NULL && strchr(c->name, '[')))
25-
/* Limit range of last symbol in module and kernel */
26-
p->end += SYMBOL_LIMIT;
27-
else
28-
p->end = c->start;
29-
pr_debug4("%s sym:%s end:%#" PRIx64 "\n", __func__, p->name, p->end);
30-
}
31-
3211
void arch__add_leaf_frame_record_opts(struct record_opts *opts)
3312
{
3413
opts->sample_user_regs |= sample_reg_masks[PERF_REG_ARM64_LR].mask;

tools/perf/arch/powerpc/util/Build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
perf-y += header.o
2-
perf-y += machine.o
32
perf-y += kvm-stat.o
43
perf-y += perf_regs.o
54
perf-y += mem-events.o

tools/perf/arch/powerpc/util/machine.c

Lines changed: 0 additions & 25 deletions
This file was deleted.

tools/perf/arch/s390/util/machine.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,3 @@ int arch__fix_module_text_start(u64 *start, u64 *size, const char *name)
3535

3636
return 0;
3737
}
38-
39-
/* On s390 kernel text segment start is located at very low memory addresses,
40-
* for example 0x10000. Modules are located at very high memory addresses,
41-
* for example 0x3ff xxxx xxxx. The gap between end of kernel text segment
42-
* and beginning of first module's text segment is very big.
43-
* Therefore do not fill this gap and do not assign it to the kernel dso map.
44-
*/
45-
void arch__symbols__fixup_end(struct symbol *p, struct symbol *c)
46-
{
47-
if (strchr(p->name, '[') == NULL && strchr(c->name, '['))
48-
/* Last kernel symbol mapped to end of page */
49-
p->end = roundup(p->end, page_size);
50-
else
51-
p->end = c->start;
52-
pr_debug4("%s sym:%s end:%#" PRIx64 "\n", __func__, p->name, p->end);
53-
}

tools/perf/util/symbol.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,6 @@ static int prefix_underscores_count(const char *str)
101101
return tail - str;
102102
}
103103

104-
void __weak arch__symbols__fixup_end(struct symbol *p, struct symbol *c)
105-
{
106-
p->end = c->start;
107-
}
108-
109104
const char * __weak arch__normalize_symbol_name(const char *name)
110105
{
111106
return name;

tools/perf/util/symbol.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ const char *arch__normalize_symbol_name(const char *name);
241241
#define SYMBOL_A 0
242242
#define SYMBOL_B 1
243243

244-
void arch__symbols__fixup_end(struct symbol *p, struct symbol *c);
245244
int arch__compare_symbol_names(const char *namea, const char *nameb);
246245
int arch__compare_symbol_names_n(const char *namea, const char *nameb,
247246
unsigned int n);

0 commit comments

Comments
 (0)