Skip to content

fix: keep semicolons inside xctrace symbols - #464

Merged
djc merged 2 commits into
flamegraph-rs:mainfrom
tomatotomata:codex/fix-xctrace-semicolon-demangling
Aug 12, 2026
Merged

fix: keep semicolons inside xctrace symbols#464
djc merged 2 commits into
flamegraph-rs:mainfrom
tomatotomata:codex/fix-xctrace-semicolon-demangling

Conversation

@tomatotomata

Copy link
Copy Markdown
Contributor

Summary

xctrace folded stacks use semicolons to separate frames. Rust demangling can introduce semicolons inside array types such as [u8; 2], so those symbols were being split into multiple frames.

I was thinking of applying the same normalization already used by inferno's DTrace collapser: replace semicolons inside the demangled symbol with colons before the XML reaches the xctrace collapser. The change is limited to the macOS demangling path and includes a regression test for an array type.

Validation

  • cargo fmt -- --check
  • cargo test --all-targets
  • git diff --check

The test suite passed on Windows. I could not run the macOS-only test locally because the Apple target is not installed here.

This follows the maintainer's invitation in #462. Let me know what you think.

Comment thread src/lib.rs Outdated
Comment thread src/lib.rs Outdated
@djc
djc merged commit e088994 into flamegraph-rs:main Aug 12, 2026
5 checks passed
@djc

djc commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants