desktop: Use demangling in tracy

This commit is contained in:
Nathan Adams 2024-08-09 15:26:09 +02:00 committed by TÖRÖK Attila
parent 2d6d4bc8f5
commit 038a714dbf
3 changed files with 5 additions and 1 deletions

1
Cargo.lock generated
View File

@ -5595,6 +5595,7 @@ checksum = "63de1e1d4115534008d8fd5788b39324d6f58fc707849090533828619351d855"
dependencies = [
"loom",
"once_cell",
"rustc-demangle",
"tracy-client-sys",
]

View File

@ -47,7 +47,7 @@ gilrs = "0.10"
tokio = { workspace = true, features = ["rt-multi-thread", "macros"]}
# Deliberately held back to match tracy client used by profiling crate
tracing-tracy = { version = "=0.11.1", optional = true }
tracing-tracy = { version = "=0.11.1", optional = true, features = ["demangle"] }
rand = "0.8.5"
thiserror.workspace = true

View File

@ -1,10 +1,13 @@
use tracing::Metadata;
use tracing_subscriber::fmt::format::DefaultFields;
use tracing_tracy::client::register_demangler;
use tracing_tracy::Config;
#[derive(Default)]
pub struct RuffleTracyConfig(DefaultFields);
register_demangler!();
impl Config for RuffleTracyConfig {
type Formatter = DefaultFields;