Skip to content

Instantly share code, notes, and snippets.

@sn00011
Forked from nebiros/xhprof for mac
Created August 19, 2011 08:12
Show Gist options
  • Save sn00011/1156307 to your computer and use it in GitHub Desktop.
Save sn00011/1156307 to your computer and use it in GitHub Desktop.
xhprof for mac
# brew install re2c graphviz
# cd /tmp
# wget http://pecl.php.net/get/xhprof-0.9.2.tgz
# tar -xvzf xhprof-0.9.2.tgz
# cd xhprof-0.9.2/extension
# phpize
# MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch i386 -arch x86_64 -bind_at_load"
# export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET
# ./configure --with-php-config=/usr/local/zend/bin/php-config
# make
# sudo make install
@sn00011
Copy link
Author

sn00011 commented Oct 13, 2011

Due a bug described in https://bugs.php.net/bug.php?id=58650 i get some problem install xhprof on my Lion with php 5.3.5

@sn00011
Copy link
Author

sn00011 commented Oct 13, 2011

There is a solution in the bug list. Also a good blog post on xhprof http://techportal.ibuildings.com/2009/12/01/profiling-with-xhprof/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment