mstange / samply

Command-line sampling profiler for macOS and Linux
Apache License 2.0
2.04k stars 49 forks source link

Add --unlink-aux-files option #142

Closed vvuk closed 3 months ago

vvuk commented 3 months ago

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 commented 3 months ago

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

vvuk commented 3 months ago

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 commented 3 months ago

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.