Bug 1274041 - Initialize jprof in child process. r=jesup

This makes a function call in XRE_InitChildProcess for the child process that
currently exists in XREMain::XRE_mainStartup for the parent process.

This allows signals that jprof uses to be sent to a child process to
profile that child process.

MozReview-Commit-ID: CeWnYl4LJyA
This commit is contained in:
L. David Baron 2016-05-20 19:57:31 -07:00
Родитель 2c8fb3d73a
Коммит d44da6b7d4
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -95,6 +95,10 @@ using mozilla::_ipdltest::IPDLUnitTestProcessChild;
#include "nsXREAppData.h"
#endif
#ifdef MOZ_JPROF
#include "jprof.h"
#endif
using namespace mozilla;
using mozilla::ipc::BrowserProcessSubThread;
@ -308,6 +312,11 @@ XRE_InitChildProcess(int aArgc,
DllBlocklist_Initialize();
#endif
#ifdef MOZ_JPROF
// Call the code to install our handler
setupProfilingStuff();
#endif
// This is needed by Telemetry to initialize histogram collection.
UniquePtr<base::StatisticsRecorder> statisticsRecorder =
MakeUnique<base::StatisticsRecorder>();