xhprof_frame_begin : Starts an artificial frame. Together with
xhprof_frame_end, this times one block of code execution as if it
were a function call, allowing people to define arbitrary function
boundaries.
xhprof_frame_end : Ends an artificial frame that xhprof_frame_begin
started. One has to make sure there are no exceptions in between these
two calls, as otherwise, it may report incorrect timings. Also,
xhprof_frame_begin and xhprof_frame_end have to be paired up
really well, so not to interfere with regular function's profiling,
unless that's the intention.
XhprofFrame : Wrapper object that calls xhprof_frame_begin in its
constructor and xhprof_frame_end in its destructor.
This functionality was back ported from HHVM's internal XHProf
implementation. There has been one small change from the HHVM
implementation with the addition of the optional $wrapped boolean
parameter to xhprof_frame_begin which is used to fix a bug in the
upstream XhprofFrame implementation which mis-attibutes function calls
in a frame introduced via XhprofFrame to XhprofFrame::__construct
rather than the name provided for the frame.
Add functions for sub-function profiling.
xhprof_frame_begin
: Starts an artificial frame. Together withxhprof_frame_end
, this times one block of code execution as if it were a function call, allowing people to define arbitrary function boundaries.xhprof_frame_end
: Ends an artificial frame thatxhprof_frame_begin
started. One has to make sure there are no exceptions in between these two calls, as otherwise, it may report incorrect timings. Also,xhprof_frame_begin
andxhprof_frame_end
have to be paired up really well, so not to interfere with regular function's profiling, unless that's the intention.XhprofFrame
: Wrapper object that callsxhprof_frame_begin
in its constructor andxhprof_frame_end
in its destructor.This functionality was back ported from HHVM's internal XHProf implementation. There has been one small change from the HHVM implementation with the addition of the optional
$wrapped
boolean parameter toxhprof_frame_begin
which is used to fix a bug in the upstreamXhprofFrame
implementation which mis-attibutes function calls in a frame introduced viaXhprofFrame
toXhprofFrame::__construct
rather than the name provided for the frame.Fixes #51