79285051

Date: 2024-12-16 14:49:31
Score: 0.5
Natty:
Report link

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.)

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When
  • Low reputation (1):
Posted by: user281577