This is a great app for profiling and optimizing your PHP, Perl and Python code. When used in conjunction with the cachegrind files produced by APD or Xdebug one can profile PHP scripts with a high degree of granularity. Getting it running on Mac is not immediate however.
The short recipe to get it setup is:- Make sure you have X11 installed.
- edit /sw/etc/fink.conf, add unstable/main and unstable/crypto to the Trees. (I've not seen the app to be unstable though)
- From the command line: # fink selfupdate; fink index; fink scanpackages
- run the command: # sudo fink install kcachegrind
NOTE: If you've installed Lesstif via some other package (there will be a file here: /usr/X11R6/include/Xm/Xm.h) Then you need to move the Xm directory temporarily somewhere else so Kcachegrind builds.
My php.ini settings look like this: ;;;;;;;;;;;;;;;;;;;;;;; ; Xdebug stuff zend_extension="/usr/local/php5/lib/php/extensions/no-debug-non-zts-20050922/xdebug.so" xdebug.default_enable = 1 ;increases memory usage xdebug.extended_info = 0 xdebug.auto_trace = 0 xdebug.trace_output_dir = "/var/log/php/xdebug" xdebug.collect_includes = 1 xdebug.show_mem_delta = 1 xdebug.remote_enable = 0 xdebug.auto_trace = 0 ; Careful... these 2 produce a lot of output xdebug.collect_params = 1 xdebug.collect_return = 1 xdebug.profiler_enable = 1 xdebug.profiler_output_dir = "/var/log/php/xdebug-profile" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
With that you should be good!