Right, since watching Rasmus Lerdorf’s talk on PHP performance I’ve been wanting to profile the ERP / Accounting application I am working on, not least because I know there are performance issues with it, profiling should highlight the major problems for me to investigate.
So downloaded xdebug and put the following few lines in my php.ini file:
zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
xdebug.profiler_output_dir="/home/me/xdebug/profiles/"
xdebug.ptofiler_enable_trigger=On
With this I simply aim my browser as my app with &XDEBUG_PROFILE in the query string and the profiling begins. The problem is the output I am viewing with KCacheGrind doesn’t include any of the functions from with my application, and no flow between entities.
When the page is executing I copied (in the terminal) the profile file to a separate file, to capture it’s state throughout the profile. I loaded each of these separately into KCacheGrind and they all show the full profile of the application, all but the last one?
Can anyone tell me why the full profile isn’t being output? Looking at the file sizes of my copied files it appears the first few are rather large, but the last one is significantly smaller, is xdebug messing with them after it has been captured?
Many thanks 🙂
EDIT
Just to help, this is what I see when I open up one of the copied profiles (before the profile has completed), I’m sure there is much more to this.

And this is what I get from the final profile, no relationships, just a bunch of PHP functions. I want to see all the full profile.

EDIT 2
So here I am constantly running the ls -als command, the last list is the cut down version, the previous one is the last ls where the file was at it’s full size.

I cannot upload the large file as it’s over 3 million lines long, if it helps here is the xdebug php info section.

Right, I’ve actually solved the problem myself, I added this option to my
php.inifile:This will append the data to the same filename if it exists, therefore I’ll need to make sure the filename option is set correctly, but I think that has solved my problem for now.
Thanks to those that answered 🙂