From cef7af25c9d3a7ea5d0c82424dc8bf93a95b6fc3 Mon Sep 17 00:00:00 2001 From: Fabian Hemmer Date: Wed, 3 Feb 2021 16:15:37 -0500 Subject: perf tools: Add OCaml demangling Detect symbols generated by the OCaml compiler based on their prefix. Demangle OCaml symbols, returning a newly allocated string (like the existing Java demangling functionality). Move a helper function (hex) from tests/code-reading.c to util/string.c To test: echo 'Printf.printf "%d\n" (Random.int 42)' > test.ml perf record ocamlopt.opt test.ml perf report -d ocamlopt.opt Signed-off-by: Fabian Hemmer Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra LPU-Reference: 20210203211537.b25ytjb6dq5jfbwx@nyu Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/Build | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/perf/util/Build') diff --git a/tools/perf/util/Build b/tools/perf/util/Build index 188521f34347..e3e12f9d4733 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -173,6 +173,7 @@ perf-$(CONFIG_ZSTD) += zstd.o perf-$(CONFIG_LIBCAP) += cap.o +perf-y += demangle-ocaml.o perf-y += demangle-java.o perf-y += demangle-rust.o -- cgit v1.2.3