Skip to content

5.4 regression: perf & flamegraph.pl do not work out-of-the-box anymore #14104

Description

@kit-ty-kate

I'm currently using 5.4.0~alpha1 and i needed to do some profiling.
I followed the recommendation of the Profiling page on ocaml.org and from experience last time i used it, i knew that perf was a reasonable option.

However to my surprised this time things didn't work.
I tried to use flamegraph.pl to output a flamegraph as i need the extra UI to get to the information i need, but the program just failed as it expects UTF-8 strings (see brendangregg/FlameGraph#356).

Looking into the perf.data file and the output of the intermediate stackcollapse-perf.pl program, we can indeed find weird dangling characters such as 0xAD in the middle of otherwise fine text. Inconveniently these characters do not appear as a normal space in my terminal and vim didn't say anything either, which delayed my understanding of the problem.

Looking at the changelog i wasn't able to find anything related to perf, however fortunately i do follow the development of the compiler and i got a hunch that it might all be related to #13050. Reading the description and discussions it seems that perf needed some update, however it doesn't seem clear to me which version it was fixing and what exactly it fixes (was the issue esthetic or functional?)

  • Is there a quick fix for this issue? Some sed or awk script somewhere maybe?
  • If this happen to be indeed the expected breaking change, could a more prominent warning to perf/flamegraph.pl users be added to the changelog?

perf version 6.14.8-400.asahi.fc42.aarch64
OCaml version 5.4.0~alpha1 (works fine with 5.3.0)
Flamegraph version brendangregg/FlameGraph@41fee1f (as packaged by Fedora)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions