Need to print all the function calls Drupal makes I need to examine all the function calls Drupal makes during it loads a page (even if there are no errors). I guess debugging software can do this but I would also like to know a way to do this without xdebug etc.

I found this link:
https://drupal.stackexchange.com/questions/545/how-to-debug-drupal
but I'm not sure where to put for example this code:

&lt;?php
$bt = debug_backtrace();
foreach ($bt as $key =&gt; $value) {
  if ($key == 0) {
    continue;
  }
  unset($bt[$key]['args']);
  unset($bt[$key]['object']);
}
drupal_set_message(str_replace('    ', '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;', nl2br(htmlentities(print_r($bt, TRUE)))));
?&gt;
I would recommend using Xdebug as opposed to any other methods.

Xdebug can easily be installed and then all you have to do is enable profiling and navigate around your site.

Not only does it list all function calls but it counts how many times each is called during a request and also times the function call, so you know exactly where to look to resolve bottlenecks.

The results can be viewed using Webgrind (browser-based) or KCacheGrind (KDE/linux), amongst others.

This is more efficient because you are not tampering with the code and littering it with debug statements.