From 1dcca9a1f23383d767769a7b35473c36b288ab8e Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Mon, 10 Dec 2007 18:23:27 +0000 Subject: [PATCH] MFB: - Split reference.xml into book.xml, examples.xml & setup.xml - Updated constants.xml to be an - Change the intro ID to intro. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@247932 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/apd/book.xml | 56 ++++++++++++++ reference/apd/constants.xml | 6 +- reference/apd/examples.xml | 104 +++++++++++++++++++++++++ reference/apd/ini.xml | 2 +- reference/apd/reference.xml | 146 +++++------------------------------- reference/apd/setup.xml | 42 +++++++++++ 6 files changed, 223 insertions(+), 133 deletions(-) create mode 100644 reference/apd/book.xml create mode 100644 reference/apd/examples.xml create mode 100644 reference/apd/setup.xml diff --git a/reference/apd/book.xml b/reference/apd/book.xml new file mode 100644 index 0000000000..232c119297 --- /dev/null +++ b/reference/apd/book.xml @@ -0,0 +1,56 @@ + + + + + + + Advanced PHP debugger + APD + + + &reftitle.intro; + + APD is the Advanced PHP Debugger. It was written to provide profiling and + debugging capabilities for PHP code, as well as to provide the ability to + print out a full stack backtrace. APD supports interactive debugging, but + by default it writes data to trace files. It also offers event based + logging so that varying levels of information (including function calls, + arguments passed, timings, etc.) can be turned on or off for individual + scripts. + + + APD is a Zend Extension, modifying the way the internals of PHP handle + function calls, and thus may or may not be compatible with other Zend + Extensions (for example Zend Optimizer). + + + + + + &reference.apd.setup; + &reference.apd.constants; + &reference.apd.examples; + &reference.apd.reference; + + + + + diff --git a/reference/apd/constants.xml b/reference/apd/constants.xml index 0be71416bf..2890d1805b 100644 --- a/reference/apd/constants.xml +++ b/reference/apd/constants.xml @@ -1,6 +1,6 @@ - -
+ + &reftitle.constants; &extension.constants; @@ -97,7 +97,7 @@
-
+
+ + + &reftitle.examples; +
+ How to use PHP-APD in your scripts + + + + As the first line of your PHP script, call the apd_set_pprof_trace() function + to start the trace: + + + + + + + + You can insert the line anywhere in your script, but if you do not start + tracing at the beginning of your script you discard profile data that might + otherwise lead you to a performance bottleneck. + + + + + Now run your script. The dump output will be written to + apd.dumpdir/pprof_pid.ext. + + + If you're running the CGI version of PHP, you will need to add the '-e' + flag to enable extended information for apd to work properly. For + example: + php -e -f script.php + + + + + + + To display formatted profile data, issue the pprofp + command with the sort and display options of your choice. The formatted + output will look something like: + + + + + + The -R option used in this example sorts the profile table by the amount + of real time the script spent executing a given function. The "cumm call" + column reveals how many times each function was called, and the "s/call" + column reveals how many seconds each call to the function required, on + average. + + + + + To generate a calltree file that you can import into the KCacheGrind + profile analysis application, issue the pprof2calltree + comand. + + + +
+
+ + + diff --git a/reference/apd/ini.xml b/reference/apd/ini.xml index ab7a696e53..2332114729 100644 --- a/reference/apd/ini.xml +++ b/reference/apd/ini.xml @@ -1,5 +1,5 @@ - +
&reftitle.runtime; &extension.runtime; diff --git a/reference/apd/reference.xml b/reference/apd/reference.xml index b56d05595c..4ed2ea2529 100644 --- a/reference/apd/reference.xml +++ b/reference/apd/reference.xml @@ -1,137 +1,24 @@ - - - + - - Advanced PHP debugger - APD - - -
- &reftitle.intro; - - APD is the Advanced PHP Debugger. It was written to provide profiling and - debugging capabilities for PHP code, as well as to provide the ability to - print out a full stack backtrace. APD supports interactive debugging, but - by default it writes data to trace files. It also offers event based - logging so that varying levels of information (including function calls, - arguments passed, timings, etc.) can be turned on or off for individual - scripts. - - - APD is a Zend Extension, modifying the way the internals of PHP handle - function calls, and thus may or may not be compatible with other Zend - Extensions (for example Zend Optimizer). - - - -
+ + APD &Functions; + +
+ Contact information + + If you have comments, bugfixes, enhancements or want to help developing + this beast, you can send an mail to + &email.apd;. Any help is very + welcome. + +
+
- &reference.apd.configure; + &reference.apd.entities.functions; - &reference.apd.ini; +
-
- &reftitle.resources; - &no.resource; -
- - &reference.apd.constants; - -
- How to use PHP-APD in your scripts - - - - As the first line of your PHP script, call the apd_set_pprof_trace() function - to start the trace: - - - - - - - - You can insert the line anywhere in your script, but if you do not start - tracing at the beginning of your script you discard profile data that might - otherwise lead you to a performance bottleneck. - - - - - Now run your script. The dump output will be written to - apd.dumpdir/pprof_pid.ext. - - - If you're running the CGI version of PHP, you will need to add the '-e' - flag to enable extended information for apd to work properly. For - example: - php -e -f script.php - - - - - - - - To display formatted profile data, issue the pprofp - command with the sort and display options of your choice. The formatted - output will look something like: - - - - - - The -R option used in this example sorts the profile table by the amount - of real time the script spent executing a given function. The "cumm call" - column reveals how many times each function was called, and the "s/call" - column reveals how many seconds each call to the function required, on - average. - - - - - To generate a calltree file that you can import into the KCacheGrind - profile analysis application, issue the pprof2calltree - comand. - - - -
- -
- Contact information - - If you have comments, bugfixes, enhancements or want to help developing - this beast, you can send an mail to - &email.apd;. Any help is very - welcome. - -
-
- -&reference.apd.entities.functions; - -
+ diff --git a/reference/apd/setup.xml b/reference/apd/setup.xml new file mode 100644 index 0000000000..e9d81e5b46 --- /dev/null +++ b/reference/apd/setup.xml @@ -0,0 +1,42 @@ + + + + + &reftitle.setup; + +
+ &reftitle.required; + &no.requirement; +
+ + &reference.apd.configure; + + &reference.apd.ini; + +
+ &reftitle.resources; + &no.resource; +
+ +
+ + +