-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
We can turn our cpu profile dumping to be crash-only (was: empty cpu profile (profiling haproxy on fedora)) #1475
Comments
I've just noticed that Fedora is using pretty old gperftools. |
well, I tested on 2.15, the same zero size |
This is because profile is dumped on program shutdown. If it dies from signal, there is no profile flushing. Have your program stop normally, or have it stop normally on signal. Or arrange profiling for specific duration and Stop it yourself. As somewhat crude (and not 100% reliable) workaround people have contributed CPUPROFILESIGNAL. Which allows you to toggle profiling on/off by sending that signal. Feel free to look it up in the code. Yes, we could turn our profile dumping design to be continuous (via mmap-ed files) and crash-only. But this is an enhancement. Let me turn this ticket into such enhancement. If there is anyone willing to volunteer several days of work into this, I am willing to guide such person. |
hello, @alk thank you for you help. I previously tried CPUPROFILESIGNAL, but it also behaves in strange way
no
|
nevermind, I've managed with "31" signal. 12 was just handled by haproxy itself |
some repro steps:
file
haproxy.prof
appears, but it's emptyOS: Fedora 39
gperftools: gperftools-libs-2.9.1-6.fc39.x86_64
The text was updated successfully, but these errors were encountered: