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

Add --unlink-aux-files option #142

Merged
merged 2 commits into from
Apr 21, 2024
Merged

Conversation

vvuk
Copy link
Collaborator

@vvuk vvuk commented Apr 20, 2024

Adds an option to record to unlink jitdump/marker files after they've been read. Fixes #64.

.. though looking over this, I only added it to mac, will add to linux.

@mstange
Copy link
Owner

mstange commented Apr 20, 2024

This looks good, will merge once you've added Linux support and addressed the failures.


/// If a process produces jitdump or marker files, unlink them after
/// opening. This ensures that the files will not be left in /tmp,
/// but it will also be impossible to look at JIT disassembly.
Copy link
Owner

Choose a reason for hiding this comment

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

[...], and line number information will be missing in the profiles.

@vvuk
Copy link
Collaborator Author

vvuk commented Apr 20, 2024

Actually, I just had an idea -- I'll make this flag unlink jitdump files after the samply process exits. This would mean that while the server is up, the jitdump files are still around to provide all the info, but get cleaned up at exit. And if you're doing --save-only, well, don't pass this flag.

@mstange
Copy link
Owner

mstange commented Apr 20, 2024

Well, that'll work until I make the planned change to daemonize the server, so that you don't have to keep pressing Ctrl+C after every profiling run (and so that you can serve multiple profiles at the same time without using up excessive numbers of ports).

I'd say don't worry about it too much at the moment - do whatever's easy and solves your use case, and we can sort out a long term solution later, once I've put the cards on the table by filing issues with all the things I have in mind.

@mstange mstange merged commit 89e7b72 into mstange:main Apr 21, 2024
11 of 12 checks passed
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.

Consider unlinking jitdump file after open
2 participants