Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heaptrack: build with zstd support #100096

Merged
merged 1 commit into from Oct 10, 2020
Merged

heaptrack: build with zstd support #100096

merged 1 commit into from Oct 10, 2020

Conversation

evanjs
Copy link
Member

@evanjs evanjs commented Oct 9, 2020

Motivation for this change

Heaptrack has supported zstd since around KDE/heaptrack@4edc100.
The AppImage has been built with support for zstd since around KDE/heaptrack@dd6a4e8.

Supporting zstd allows for e.g. opening heaptrack.$APP.$PID.zst files.

I am happy to make this an option that is initially disabled if it's not something we want to enable by default.

Things done
  • Add zstd to buildInputs
Results

After building with zstd in buildInputs, I am able to open heaptrack.*.zst files and navigate them with the heaptrack.

The increase in closure size seems negligible:

nix path-info -Ss
/nix/store/1xai6fj16i9iwishi5a0vxxwh9mc90xx-heaptrack-1.2.0         1819808      1490725304
/nix/store/2n9a4s18ai89g6f5c69dcj0fr44x4whc-heaptrack-1.2.0         1916016      1491624872

nix path-info -Ssh
/nix/store/1xai6fj16i9iwishi5a0vxxwh9mc90xx-heaptrack-1.2.0        1.7M    1.4G
/nix/store/2n9a4s18ai89g6f5c69dcj0fr44x4whc-heaptrack-1.2.0        1.8M    1.4G

@evanjs evanjs requested review from gebner and dtzWill October 9, 2020 18:00
@evanjs
Copy link
Member Author

evanjs commented Oct 9, 2020

Okay, now that I'm looking a bit closer, do we even need to include zstd explicitly?
Re: https://github.com/KDE/heaptrack/blob/21c21b825dd8c41b4740cd1988780a38554b8dad/CMakeLists.txt#L30

Perhaps I'm reading it wrong, and Zstd depends on Boost iostream support?
In which case, false alarm, we should be fine 😬

@gebner
Copy link
Member

gebner commented Oct 9, 2020

Yes, we definitely want to enable it by default.

Can the current heaptrack open zstd-compressed files?

@evanjs
Copy link
Member Author

evanjs commented Oct 9, 2020

@gebner this is what happens when I try to do so:
heaptrack was built without zstd support, cannot decompressed data file: ./heaptrack.program.8773.zst

image
Ironically, the hint/watermark text suggests zst (I guess the flag checking isn't that complex in the main application)

@gebner
Copy link
Member

gebner commented Oct 10, 2020

Thanks!

The evaluation failure is unrelated.

@gebner gebner merged commit 763bbfd into NixOS:master Oct 10, 2020
@evanjs evanjs deleted the heaptrack/zstd branch October 10, 2020 12:41
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.

None yet

2 participants