1. Install dependencies

# apt-get install php5-dev

2. Download xhprof source

$ cd /tmp $ git clone git://github.com/facebook/xhprof.git

3. Install xhprof PHP extension

$ cd xhprof/extension $ phpize $ ./configure $ make # make install # echo “extension=xhprof.so” > /etc/php5/conf.d/xhprof.ini # echo “xhprof.output_dir=/tmp” >> /etc/php5/conf.d/xhprof.ini # service apache2 restart

4. Install XHProf module in Drupal

  1. Install in Drupal 6.x # cp -a /tmp/xhprof/xhprof_* /var/www/ $ cd myproject $ drush dl devel $ go to admin/settings/devel $ Enable profiling $ Set xhprof directory: /var/www $ Set XHProf URL: http://localhost/xhprof_html

  2. Install in Drupal 7.x $ cd myproject/ $ drush dl XHProf-7.x-1.x-dev $ drush en -y xhprof $ go to: admin/config/development/xhprof $ Enable profiling

Blessings!