Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@alexheretic
Copy link

@alexheretic alexheretic commented Nov 4, 2025

New option for recording compressed trace data. This can make a significant difference to the perf.data size.

  -z, --compression-level [<COMPRESSION_LEVEL>]
          Produce compressed trace using the specified level. perf only

Example using (fastest) compression level -z

[ perf record: Woken up 11606 times to write data ]
[ perf record: Captured and wrote 96.617 MB perf.data, compressed (original 2950.013 MB, ratio is 30.572) ] 

What would have been ~3GB perf.data is ~100MB compressed without any noticeable overhead 🙂

Alternatives

It is possible to do this already with --cmd "record -F 997 --call-graph dwarf,64000 -g -z" but this isn't as nice, and compression is something I want to use pretty much always.

Maps to perf --compression-level/-z
.as_deref()
.filter(|_| {
a.target.name == *target && a.target.kind.iter().any(|k| kind.contains(&k))
a.target.name == *target && a.target.kind.iter().any(|k| kind.contains(k))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These seem like unrelated changes, right? Are they giving you warnings or something?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep clippy::needless_borrow

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