When compiling in --release
mode Rust strips debug symbols by default. This makes inspecting the code in a profiler more difficult. (You'll see something similar with cargo-flamegraph, which uses dtrace on mac.)
Something that I do, recommended by samply, is setting a custom compiler profile which is, effectively "release" + debug symbols.
# for use with perf-analysis tools like `samply`
[profile.profiling]
inherits = "release"
debug = true
Also, if you're on mac, then Instruments is famously useful, and builds on dtrace. (It's something that I only discovered recently and have no strong comments, other than it's very promising and almost certainly worth using.)