I'm not certain if this error is MacOS specific for sure, but using recent cargo flamegraph with xctrace backend, functions with array types in them are being split across multiple lines on the semicolon. I've attached an example svg, generated from the following code:
//! Run with `cargo flamegraph --ignore-status`
use std::hint::black_box;
use std::time;
use std::time::Duration;
fn foo<T: Default>() -> T {
let start = time::SystemTime::now();
while (time::SystemTime::now().duration_since(start).unwrap()) < Duration::from_secs(1) {
black_box(())
}
black_box(T::default())
}
fn main() {
for _ in 0..10 {
println!("{:?}", foo::<[u8; 2]>());
}
}
The --ignore-status is needed for an unrelated issue. Originally noticed while profiling something with quite a few array types in the demangled type, leading to comedically tall stacks.
I'm not certain if this error is MacOS specific for sure, but using recent
cargo flamegraphwith xctrace backend, functions with array types in them are being split across multiple lines on the semicolon. I've attached an example svg, generated from the following code:The
--ignore-statusis needed for an unrelated issue. Originally noticed while profiling something with quite a few array types in the demangled type, leading to comedically tall stacks.