Open nricciardi opened 4 months ago
I don't think there is enough information here for me to diagnose this, and it seems unlikely to be a problem with cargo flamegraph
itself. I'm guessing your application hangs. Maybe you can try perf record
to record a profile and then process it with flamegraph
? Or maybe try the samply
profiler instead.
Thank you to answer me.
How can I produce SVG using flamegraph from perf record output?
However, to reproduce my issue, my Rust application is a Markdown compiler (https://github.com/nricciardi/nmd). Running, for example, cargo flamegraph -- compile dossier -i test-resources/nmd-test-dossier-1 --fast-draft
Using a simple main having only one instruction std::process::exit(0);
profiling terminates correctly producing SVG. In particular, after [perf record: ...]
there is a new line: writing flamegraph to "flamegraph.svg"
I tried to put exit(0)
in my code without any results, but sometimes (in a no deterministic way) writing flamegraph to "flamegraph.svg"
was displayed.
Sorry, I don't have time to provide support for flamegraph at this level.
I'm using Flamegraph on Linux Mint 21.3 (kernel 5.15.0-113-generic) to profile my Rust application. When I run
the terminal remains blocked showing:
(SVG file is not produced)
I must interrupt with CTRL + C and then SVG report is produced, but it does not have any profiled function of my Rust application.
If I run flamegraph with the same application, but throwing e.g.
todo!()
, then terminal exits correctly and flamegraph produces SVG report without CTRL + C.My
Cargo.toml
file is the following:I have tried also using
--root
option without results. How can I fix it?