-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ktrace): Avoid allocations for Debug fields
Serde supports serializing `Display` values via `collect_str`, without having to explicitly buffer them ahead of time. Using this for `Debug` values produced by `tracing` means the ktrace protocol implementation no longer needs to allocate. The downside is that postcard implements `collect_str` by processing the value twice, to determine its length. However, as jamesmunns/postcard#32 points out, this is likely fine since the data shouldn't be large.
- Loading branch information
Showing
2 changed files
with
42 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters