preinheimer / xhprof

XHGUI is a GUI for the XHProf PHP extension, using a database backend, and pretty graphs to make it easy to use and interpret.
Other
834 stars 185 forks source link

Compile error. PHP 5.6.18 #96

Open liuqian1990 opened 8 years ago

liuqian1990 commented 8 years ago

/home/webadm/wwwroot/xhprof_new/extension/xhprof.c: In function ‘hp_get_function_name’: /home/webadm/wwwroot/xhprof_new/extension/xhprof.c:972: warning: assignment discards qualifiers from pointer target type /home/webadm/wwwroot/xhprof_new/extension/xhprof.c:1042: warning: passing argument 1 of ‘hp_get_base_filename’ discards qualifiers from pointer target type /home/webadm/wwwroot/xhprof_new/extension/xhprof.c:926: note: expected ‘char ’ but argument is of type ‘const char ’ /home/webadm/wwwroot/xhprof_new/extension/xhprof.c: In function ‘hp_execute_internal’: /home/webadm/wwwroot/xhprof_new/extension/xhprof.c:1741: error: ‘zend_execute_data’ has no member named ‘Ts’ /home/webadm/wwwroot/xhprof_new/extension/xhprof.c: In function ‘hp_compile_file’: /home/webadm/wwwroot/xhprof_new/extension/xhprof.c:1785: warning: passing argument 1 of ‘hp_get_base_filename’ discards qualifiers from pointer target type /home/webadm/wwwroot/xhprof_new/extension/xhprof.c:926: note: expected ‘char ’ but argument is of type ‘const char ’ /home/webadm/wwwroot/xhprof_new/extension/xhprof.c: In function ‘hp_begin’: /home/webadm/wwwroot/xhprof_new/extension/xhprof.c:1853: error: lvalue required as left operand of assignment /home/webadm/wwwroot/xhprof_new/extension/xhprof.c:1856: warning: assignment from incompatible pointer type /home/webadm/wwwroot/xhprof_new/extension/xhprof.c:1861: warning: assignment from incompatible pointer type /home/webadm/wwwroot/xhprof_new/extension/xhprof.c: In function ‘hp_stop’: /home/webadm/wwwroot/xhprof_new/extension/xhprof.c:1926: error: lvalue required as left operand of assignment /home/webadm/wwwroot/xhprof_new/extension/xhprof.c:1927: warning: assignment from incompatible pointer type

aik099 commented 8 years ago

I guess something similar will happen for PHP 7 as well.

Have you tried compiling using original Facebook repo (from where this one is forked): https://github.com/phacility/xhprof ?

I'm not sure, but seems that only UI part (not PHP extension code) is different between these 2 repos.

tperalta82 commented 8 years ago

Use tideways extension which is an updated xhprof https://github.com/tideways/php-profiler-extension

and check my pull request https://github.com/preinheimer/xhprof/pull/97

aik099 commented 8 years ago

Not sure what exactly is changed. For example since this project was originally forked from Facebook version the PHP extension was changed in a ways, that doesn't map to changes made in original Facebook XHProf project.

I bet both tideways, uprofiler and other xhprof forks also have their unique changes, that are then used in their bundled UI.

tperalta82 commented 8 years ago

exactly, it's basically a fork with more features, but seems to keep the base ones. the only thing that seems to be changed (From base as well) is the naming structure, instead of XHPROF it's TIDEWAYS