Bug 1488808 Part 7 - Keep track of the PID of the recording process, r=froydnj.

--HG--
extra : rebase_source : 6ac89e1c4ac71a29a7710f64e74654b119c76896
This commit is contained in:
Brian Hackett 2018-10-17 10:02:02 -06:00
Родитель 3303482d71
Коммит a527b58145
2 изменённых файлов: 13 добавлений и 0 удалений

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

@ -51,6 +51,9 @@ char* gRecordingFilename;
// Current process ID.
static int gPid;
// ID of the process which produced the recording.
static int gRecordingPid;
// Whether to spew record/replay messages to stderr.
static bool gSpewEnabled;
@ -154,6 +157,7 @@ RecordReplayInterface_Initialize(int aArgc, char* aArgv[])
Lock::InitializeLocks();
InitializeRewindState();
gRecordingPid = RecordReplayValue(gPid);
gInitialized = true;
}
@ -327,6 +331,12 @@ ThreadEventName(ThreadEvent aEvent)
return gRedirections[callId].mName;
}
int
GetRecordingPid()
{
return gRecordingPid;
}
///////////////////////////////////////////////////////////////////////////////
// Record/Replay Assertions
///////////////////////////////////////////////////////////////////////////////

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

@ -232,6 +232,9 @@ MOZ_MakeRecordReplayPrinter(PrintSpew, true)
#undef MOZ_MakeRecordReplayPrinter
// Get the ID of the process that produced the recording.
int GetRecordingPid();
///////////////////////////////////////////////////////////////////////////////
// Profiling
///////////////////////////////////////////////////////////////////////////////