Skip to content

Commit cd21898

Browse files
authored
fix: tracy integration (#11135)
- always register demangler - remove split debug info, tracy can't seem to find debug info
1 parent 1c7cd9d commit cd21898

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ codegen-units = 16
8787
[profile.profiling]
8888
inherits = "release"
8989
debug = "full"
90-
split-debuginfo = "unpacked"
91-
strip = false
90+
strip = "none"
9291

9392
[profile.bench]
9493
inherits = "profiling"
@@ -287,7 +286,6 @@ thiserror = "2"
287286
# allocators
288287
mimalloc = "0.1"
289288
tikv-jemallocator = "0.6"
290-
tracy-client = "0.18"
291289

292290
# misc
293291
auto_impl = "1"

crates/cli/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,11 @@ strum = { workspace = true, features = ["derive"] }
5151
tokio = { workspace = true, features = ["macros"] }
5252
tracing-subscriber = { workspace = true, features = ["registry", "env-filter"] }
5353
tracing.workspace = true
54-
tracy-client = { workspace = true, optional = true, features = ["demangle"] }
5554
yansi.workspace = true
5655
rustls = { workspace = true, features = ["ring"] }
5756
dunce.workspace = true
5857

59-
tracing-tracy = { version = "0.11", optional = true }
58+
tracing-tracy = { version = "0.11", optional = true, features = ["demangle"] }
6059

6160
[dev-dependencies]
6261
tempfile.workspace = true
@@ -66,6 +65,6 @@ tikv-jemallocator = { workspace = true, optional = true }
6665

6766
[features]
6867
tracy = ["dep:tracing-tracy"]
69-
tracy-allocator = ["dep:tracy-client", "tracy"]
68+
tracy-allocator = ["tracy"]
7069
jemalloc = ["dep:tikv-jemallocator"]
7170
mimalloc = ["dep:mimalloc"]

crates/cli/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ extern crate tracing;
1414
pub mod handler;
1515
pub mod opts;
1616
pub mod utils;
17+
18+
#[cfg(feature = "tracy")]
19+
tracing_tracy::client::register_demangler!();

crates/cli/src/utils/allocator.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ cfg_if::cfg_if! {
2020
// Wrap the allocator if the `tracy-allocator` feature is enabled.
2121
cfg_if::cfg_if! {
2222
if #[cfg(feature = "tracy-allocator")] {
23-
type AllocatorWrapper = tracy_client::ProfiledAllocator<AllocatorInner>;
24-
tracy_client::register_demangler!();
23+
type AllocatorWrapper = tracing_tracy::client::ProfiledAllocator<AllocatorInner>;
2524
const fn new_allocator_wrapper() -> AllocatorWrapper {
2625
AllocatorWrapper::new(AllocatorInner {}, 100)
2726
}

0 commit comments

Comments
 (0)