[PATCH 4/5] perf symbol: By default only fix zero length symbols
From: Ian Rogers
Date: Thu Apr 07 2022 - 19:05:37 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.
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
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 087cdf2a58c9..59c562316d75 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