• Fabian Hemmer's avatar
    perf tools: Add OCaml demangling · cef7af25
    Fabian Hemmer authored
    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: default avatarFabian Hemmer <copy@copy.sh>
    Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    LPU-Reference: 20210203211537.b25ytjb6dq5jfbwx@nyu
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    cef7af25
demangle-ocaml.h 182 Bytes