[PATCH v2 3/4] perf symbol: By default only fix zero length symbols
From: Ian Rogers
Date: Tue Apr 12 2022 - 11:48:42 EST
For architectures without a specific end fixup (ie not arm64, powerpc,
s390) only fix up the end of zero length symbols. This reverts the
behavior introduced by:
https://lore.kernel.org/lkml/20220317135536.805-1-mpetlan@xxxxxxxxxx/
where non-zero length symbols were expanded to the start of the current
symbol.
---
tools/perf/util/symbol.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index cc4c46563802..62163b45cf3f 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -104,7 +104,8 @@ static int prefix_underscores_count(const char *str)
void __weak arch__symbols__fixup_end(struct symbol *p, struct symbol *c,
bool is_kernel __maybe_unused)
{
- if (p->end == p->start || p->end != c->start)
+ /* If the previous symbol is zero length, make its end the start of the current symbol. */
+ if (p->end == p->start)
p->end = c->start;
}
--
2.35.1.1178.g4f1659d476-goog