facebook/hhvm — pull request #4545 by rrh (2014-12-30 19:15:38+00:00)
Title: Add a system profiler class and hook some actions of interest to New Rel...

...ic.

This PR re-does an earlier PR which was abandoned in the summer 2014:
https://github.com/facebook/hhvm/pull/3082
At the time, PR 3082 was abandoned in favor of local development using
a subclass of the recently developed DebugHookHandler. However, using
DebugHookHandler proved to be too intrusive, heavy weight and expensive,
and I find that this mechanism is sufficient, albeit it is yet another
mechanism.

Don't have ProfilerFactory::setExternalProfiler delete a pre-existing
external profiler, as that is not the sole ownership point.

Don't assume that the External profiler wants to ignore builtin functions.