Add back in ext_system_profiler.{cpp,h} as that is faster than using the
debugger hooks.

Get the function return hooks back in again after a botched rebase.