build(rust): don't strip release binaries (#7403)

Stripping the release binaries makes stacktraces completely useless.
This commit is contained in:
Thomas Eizinger
2024-11-28 20:46:29 +00:00
committed by GitHub
parent 3ccf795195
commit 1baf669434
2 changed files with 1 additions and 8 deletions

View File

@@ -189,8 +189,6 @@ tracing-stackdriver = { git = "https://github.com/thomaseizinger/tracing-stackdr
tracing = "0.1.40"
[profile.release]
strip = true
# Full link-time optimization. Reduces binaries by up to 3x on some platforms.
lto = "fat"
@@ -198,17 +196,12 @@ lto = "fat"
# at the expense of compilation time
codegen-units = 1
[profile.bench]
strip = false # Frame pointers are necessary for profiling; `strip=true` appears to remove them.
# Override build settings just for the GUI client, so we get a pdb/dwp
# Cargo ignores profile settings if they're not in the workspace's Cargo.toml
[profile.dev.package.firezone-gui-client]
debug = "full"
split-debuginfo = "packed"
strip = "none"
[profile.release.package.firezone-gui-client]
debug = "full"
split-debuginfo = "packed"
strip = "none"

View File

@@ -33,7 +33,7 @@ Resulting in, e.g.
The recommended way for benchmarking any of the Rust components is Linux' `perf` utility.
For example, to attach to a running application, do:
1. Ensure the binary you are profiling is compiled with the `bench` profile.
1. Ensure the binary you are profiling is compiled with the `release` profile.
1. `sudo perf perf record -g --freq 10000 --pid $(pgrep <your-binary>)`.
1. Run the speed test or whatever load-inducing task you want to measure.
1. `sudo perf script > profile.perf`