Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I ran into a similar situation where I only had access to a terminal and not visual environment on which to test. Even worse, I was using a windows machine and Putty.</p> <p>The solutions available are </p> <ol> <li>Installing WebGrind (<a href="http://code.google.com/p/webgrind/" rel="nofollow noreferrer">http://code.google.com/p/webgrind/</a>)</li> <li>Running Xdebug and copying the cachegrind.out files onto a machine where you have a cachegrind viewer.</li> </ol> <p>For me the answer was to SCP the cachegrind files onto my local windows machine, and using WinCachegrind to look at them. You could SCP them onto your linux box and run KCacheGrind on the files. The downside to this, is that you may not have the same file structure, so you won't be able to view the sourcecode. If you have the source also on your local machine, or can get it there, you can fix this too. Open up the cachegrind files in vim (or other editor) and do a global search and replace on the paths to change them to the correct source path on your local machine.</p> <p>I hope this is what you were looking for.</p> <p>EDIT to address comment:</p> <p>If you are working to get a callgrind file that is somewhat different. For this, you need to be running in Linux (which I think you are) and have the callgrind and valgrind programs available. The last thing to assume here is that you are running PHP as an Apache mod and not in some other fashion. Use the callgrind tool against the starting of apache and then run the request in the browser. This will give you detailed information not only on the php call tree, but also on many things in Apache that may be causing trouble. </p> <p>here is an example of the </p> <pre><code>sudo callgrind --dump-instr=yes --trace-jump=yes -v /usr/sbin/httpd -X </code></pre> <p>The -X will start apache in debug mode with only one thread. From here open a web browser and hit the php script you want. Then go back and shutdown apache. This should also end the callgrind parse. </p> <p>If you do not need apache or a web browser, you can try running callgrind with just the php command</p> <pre><code>sudo callgrind --dump-instr=yes --trace-jump=yes -v /usr/sbin/php my_php_script.php </code></pre> <p>That should give you the same results but without all the apache stuff.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload