summaryrefslogtreecommitdiff
path: root/tools/perf/util/demangle-ocaml.c
diff options
context:
space:
mode:
authorFabian Hemmer <copy@copy.sh>2021-02-26 10:52:23 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-03-30 18:45:59 +0300
commit292c5ed168597df85f53cb03ec3e831b18969b62 (patch)
tree602a7a4516b234a4b234025d4fa5ca00986c2c63 /tools/perf/util/demangle-ocaml.c
parentb0a752d43b1566451332bcb5b52b9694dfe7896c (diff)
downloadlinux-292c5ed168597df85f53cb03ec3e831b18969b62.tar.xz
perf tools: Preserve identifier id in OCaml demangler
Some OCaml developers reported that this bit of information is sometimes useful for disambiguating functions for which the OCaml compiler assigns the same name, e.g. nested or inlined functions. Signed-off-by: Fabian Hemmer <copy@copy.sh> Link: http://lore.kernel.org/lkml/20210226075223.p3s5oz4jbxwnqjtv@nyu Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/demangle-ocaml.c')
-rw-r--r--tools/perf/util/demangle-ocaml.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/tools/perf/util/demangle-ocaml.c b/tools/perf/util/demangle-ocaml.c
index 3df14e67c622..9d707bb60b4b 100644
--- a/tools/perf/util/demangle-ocaml.c
+++ b/tools/perf/util/demangle-ocaml.c
@@ -64,17 +64,5 @@ ocaml_demangle_sym(const char *sym)
}
result[j] = '\0';
- /* scan backwards to remove an "_" followed by decimal digits */
- if (j != 0 && isdigit(result[j - 1])) {
- while (--j) {
- if (!isdigit(result[j])) {
- break;
- }
- }
- if (result[j] == '_') {
- result[j] = '\0';
- }
- }
-
return result;
}