It appears the documentation is still available at:
http://web.archive.org/web/20110923223218/http://www.mirror.facebook.net...
Key snippets:
XHProf Overview
XHProf provides:
- Flat profile
- Provides function-level summary information such number of calls, inclusive/exclusive wall time, memory usage, and CPU time.
- Hierarchical profile (Parent/Child View) (screenshot) http://web.archive.org/web/20110923223218/http://www.mirror.facebook.net...

For each function, it provides a breakdown of calls and times per parent (caller) & child (callee), such as:
- what functions call a particular function and how many times?
- what functions does a particular function call?
- The total time spent under a function when called from a particular parent.
Diff Reports
You may want to compare data from two XHProf runs for various reasons-- to figure out what's causing a regression between one version of the code base to another, to evaluate the performance improvement of a code change you are making, and so on.
A diff report takes two runs as input and provides both flat function-level diff information, and hierarchical information (breakdown of diff by parent/children functions) for each function.
The "flat" view in the diff report points out the top regressions & improvements.
Clicking on functions in the "flat" view of the diff report, leads to the "hierarchical" (or parent/child) diff view of a function. We can get a breakdown of the diff by parent/children functions.
Callgraph View
The profile data can also be viewed as a callgraph. The callgraph view highlights the critical path of the program.
Memory Profile
XHProf's memory profile mode helps track functions that allocate lots of memory.
It is worth clarifying that that XHProf doesn't strictly track each allocation/free operation. Rather it uses a more simplistic scheme. It tracks the increase/decrease in the amount of memory allocated to PHP between each function's entry and exit. It also tracks increase/decrease in the amount of peak memory allocated to PHP for each function.
XHProf tracks include, include_once, require and require_once operations as if they were functions. The name of the file being included is used to generate the name for these "fake" functions.
Terminology
- Inclusive Time (or Subtree Time): Includes time spent in the function as well as in descendant functions called from a given function.
- Exclusive Time/Self Time: Measures time spent in the function itself. Does not include time in descendant functions.
- Wall Time: a.k.a. Elapsed time or wall clock time.
- CPU Time: CPU time in user space + CPU time in kernel space
Attaching here also in PDF format for reference
| Comment | File | Size | Author |
|---|---|---|---|
| XHProf_Documentation.pdf | 283.44 KB | davidwhthomas |
Comments
Comment #1
davidwhthomas commentedComment #2
davidwhthomas commented