Req #64709 [Opn]: Get a PHP stack trace on process signal
Edit report at https://bugs.php.net/bug.php?id=64709&edit=1
ID: 64709
Updated by: sixd@php.net
Reported by: williama_lovaton at coomeva dot com dot co
Summary: Get a PHP stack trace on process signal
Status: Open
Type: Feature/Change Request
Package: Performance problem
Operating System: Linux
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Also review XHProf & XHGui
Previous Comments:
------------------------------------------------------------------------
[2013-04-25 17:19:16] ab@php.net
With performance - what about profiling with xdebug or zend?
The other were for sure possible catching some signal. Though dunno yet if the same gdb
functionality is available on windows.
------------------------------------------------------------------------
[2013-04-25 16:22:02] williama_lovaton at coomeva dot com dot co
Description:
------------
I'm not sure if this is possible to implement or if it's implemented now but I'd like
a way to get a PHP stack trace of a running process on any given time (may be using a process signal
with kill).
This would be very similar to what you can do with Java, you do a "kill -3 <pid>"
but the process doesn't die, instead it outputs a full backtrace of Java code of every thread
and the current state.
You can do something similar now using the gstack command from GDB but you'll get a stack trace
from the C code. I'd like to be able to get a stack trace but from the PHP code so that I can
analyze where is the exact point in the program where my web app is running slow or getting stuck.
My web app is instrumented and I can get logs from slow functions but this is information I get
after the fact. With this feature request it would be possible to get the information exactly when
it is happening.
Is this possible? If so, would it be possible to make it work if PHP is being run as an Apache
module?
Thanks a lot for your time.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64709&edit=1
Thread (7 messages)