Filed upstream as https://github.com/facebook/hhvm/issues/4354:
The current implementation closes the artificial frame when XhprofFrame::__construct returns and instead leaves the XhprofFrame::__construct frame on the call trace stack. The artificial frame should either be inserted in the call trace stack below the XhprofFrame::__construct frame or the XhprofFrame::__construct should not create and destroy a frame on the stack at all.