Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
e3df210
Remove Composer support from XHProf
Aug 27, 2014
6065346
Update .arcconfig and acknowledge that we're the new maintainers in X…
Aug 27, 2014
28d18dd
Fix mismatched tag in contacts
jwpage Aug 28, 2014
7adedec
XHProf: add .arclint, fix some minor issues
Aug 28, 2014
a39446c
Add a basic `arc unit` test binding to XHProf
Aug 28, 2014
d8ca30a
Add a failing test case for the XHProf PHP 5.5 segfault
Aug 28, 2014
55a47c0
Fix XHProf segfault when calling internal functions in PHP 5.5
Aug 28, 2014
91e0be9
Fix broken XHProf unit tests
Aug 28, 2014
fdd10ab
Add a failing test for crashes during auto_append_file
Feb 26, 2015
63169a7
Add a failing test for auto_prepend_file
Feb 26, 2015
a3bc669
Fix segfaults with auto_prepend_file and auto_append_file
Feb 26, 2015
4dbb1aa
Fix misspelling of "XHProf" as "XHPRrof" in several tests
Feb 26, 2015
a64844d
Add a test case for a memory leak in xhprof_enable()
Feb 26, 2015
ff8b389
Fix a memory leak in the ignored function list
Feb 26, 2015
0bbf2a2
Use sys_get_temp_dir(), not hardcoded "/tmp"
Feb 26, 2015
1a3d58d
php7 support. not finished
Jul 22, 2015
fbb89a9
unfinished
Aug 17, 2015
8171946
proxy zend_execute_internal in RINIT
Aug 20, 2015
e9b97bc
ok now could run simple program, user funciton supported not finished
Aug 21, 2015
6c473e3
no seg bug mem still leaks.
Aug 24, 2015
07fdb4f
comment out unused code
Aug 28, 2015
8ddfbd0
fix mem leaks
Aug 28, 2015
231ec6f
add url
Sep 3, 2015
2053ce4
function well but mem leaks a little
Sep 3, 2015
3dab7bb
big change. no memleaks
Sep 6, 2015
a292de7
fixed a big big bug
Sep 6, 2015
ffab5d9
add class
Sep 9, 2015
d612b2c
fix class inhired class name
Sep 9, 2015
68bd7d8
delete unused code, and nolonger suppor sample
Sep 9, 2015
478145c
stop prof after disable
Sep 10, 2015
8b58952
Fix static class error
Nov 9, 2015
69ce101
Add require suppor
Nov 9, 2015
6f59ef0
Remove ignore support
Nov 9, 2015
be4a5fb
Added run_init entry
Dec 1, 2015
6d90a2c
Back up, memleaks during rec
Dec 1, 2015
e94a189
Fixed a Seg
Dec 2, 2015
6d243fd
Added README
Dec 11, 2015
3c99b14
Rename Readme
Dec 11, 2015
f936714
Added README.md
Dec 11, 2015
a1ce315
Update readme
Jan 11, 2016
f6b73f7
typo
Mar 28, 2016
17a22b2
fix bug:in the prof result internal method does not display class name
Oct 19, 2016
b572887
Merge pull request #1 from zhaoxiwu/php7
Oct 21, 2016
31983d8
Update xhprof.c
c9s Jan 17, 2017
52a54a5
Merge pull request #2 from c9s/patch-1
Feb 7, 2017
10eac34
Fix segfault
Provoker Mar 1, 2017
36b44f4
Merge pull request #3 from Provoker/fix
May 1, 2017
73c34e0
Update README.md
rustjson Nov 25, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .arcconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"project_id" : "xhprof",
"conduit_uri" : "https://secure.phabricator.com/",
"remote_hooks_installed" : true,
"copyright_holder" : "Facebook, Inc."
}
"phabricator.uri": "https://secure.phabricator.com/",
"load": ["support/libxhprof"],
"unit.engine": "XHProfExtensionUnitTestEngine"
}
30 changes: 30 additions & 0 deletions .arclint
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"exclude": [
"(^xhprof_html/jquery/)",
"(^xhprof_html/docs/)",
"(^extension/Makefile.local)"
],
"linters": {
"chmod": {
"type": "chmod"
},
"filename": {
"type": "filename"
},
"generated": {
"type": "generated"
},
"merge-conflict": {
"type": "merge-conflict"
},
"nolint": {
"type": "nolint"
},
"text-without-length": {
"type": "text",
"severity": {
"3": "disabled"
}
}
}
}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@ extension/*
!extension/php_xhprof.h
!extension/tests/
!extension/xhprof.c

extension/tests/*.sh
extension/tests/*.exp
extension/tests/*.out
extension/tests/*.diff
extension/tests/*.log
extension/tests/*.php

support/libxhprof/.phutil_module_cache
3 changes: 2 additions & 1 deletion CREDITS
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Originally developed at Facebook, XHProf was open sourced in Mar, 2009.

XHProf is now maintained by Phacility.

Creators:
Changhao Jiang
Kannan Muthukkaruppan
Expand All @@ -9,4 +11,3 @@ Creators:
Additional Contributors:
George Cabrera - UI enhancements
Paul Saab - FreeBSD port

1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down
7 changes: 0 additions & 7 deletions README

This file was deleted.

21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# xhprof for PHP7

Please do not use this in an production env.


## Install

### Compile in Linux
```
$ /$PHP7/bin/phpize
$ ./configure --with-php-config=/$PHP7/bin/php-config
$ make && make install
```
edit php.ini, add a new line:
```
extension=xhprof.so
```
make sure it works:
```
php7 -m |grep xhprof
```
1 change: 1 addition & 0 deletions bin/xhprofile
17 changes: 0 additions & 17 deletions composer.json

This file was deleted.

19 changes: 17 additions & 2 deletions examples/sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,28 @@ function foo() {
xhprof_enable();

// run program
foo();
for ($i = 0; $i < 1000; $i++) {

foo();
}

// stop profiler
$xhprof_data = xhprof_disable();

// display raw xhprof data for the profiler run
print_r($xhprof_data);

xhprof_enable();

// run program
for ($i = 0; $i < 1000; $i++) {

foo();
}

// stop profiler
$xhprof_data = xhprof_disable();
print_r($xhprof_data);

$XHPROF_ROOT = realpath(dirname(__FILE__) .'/..');
include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_lib.php";
Expand All @@ -37,8 +51,9 @@ function foo() {
// save the run under a namespace "xhprof_foo"
$run_id = $xhprof_runs->save_run($xhprof_data, "xhprof_foo");


echo "---------------\n".
"Assuming you have set up the http based UI for \n".
"XHProf at some address, you can view run at \n".
"http://<xhprof-ui-address>/index.php?run=$run_id&source=xhprof_foo\n".
"<a href='http://".$_SERVER['HTTP_HOST']."/xhprof_html/index.php?run=$run_id&source=xhprof_foo'>click here</a>\n".
"---------------\n";
1 change: 0 additions & 1 deletion extension/config.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

PHP_ARG_ENABLE(xhprof, whether to enable xhprof support,
[ --enable-xhprof Enable xhprof support])

Expand Down
2 changes: 1 addition & 1 deletion extension/php_xhprof.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ PHP_FUNCTION(xhprof_disable);
PHP_FUNCTION(xhprof_sample_enable);
PHP_FUNCTION(xhprof_sample_disable);

#endif /* PHP_XHPROF_H */
#endif /* PHP_XHPROF_H */
35 changes: 0 additions & 35 deletions extension/tests/common.php

This file was deleted.

1 change: 1 addition & 0 deletions extension/tests/tags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!_TAG_FILE_SORTED 2 /0=unsorted, 1=sorted, 2=foldcase/
2 changes: 1 addition & 1 deletion extension/tests/xhprof_001.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
XHPRrof: Basic Profiling Test
XHProf: Basic Profiling Test
Author: Kannan
--FILE--
<?php
Expand Down
2 changes: 1 addition & 1 deletion extension/tests/xhprof_002.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
XHPRrof: Test (direct and indirect) recursive function calls.
XHProf: Test (direct and indirect) recursive function calls.
Author: Kannan
--FILE--
<?php
Expand Down
2 changes: 1 addition & 1 deletion extension/tests/xhprof_003.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
XHPRrof: Test Class Methods, Constructors, Destructors.
XHProf: Test Class Methods, Constructors, Destructors.
Author: Kannan
--FILE--
<?php
Expand Down
2 changes: 1 addition & 1 deletion extension/tests/xhprof_004.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
XHPRrof: Test Include File (load/run_init operations)
XHProf: Test Include File (load/run_init operations)
Author: Kannan
--FILE--
<?php
Expand Down
26 changes: 0 additions & 26 deletions extension/tests/xhprof_004_inc.php

This file was deleted.

28 changes: 0 additions & 28 deletions extension/tests/xhprof_004_require.php

This file was deleted.

2 changes: 1 addition & 1 deletion extension/tests/xhprof_005.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
XHPRrof: Timer Tests
XHProf: Timer Tests
Author: Kannan
--FILE--
<?php
Expand Down
78 changes: 0 additions & 78 deletions extension/tests/xhprof_006.phpt

This file was deleted.

Loading