Bug 723802 - Add telemetry for startup crash detection (1/2) - timeline portion. r=taras

--HG--
extra : rebase_source : 8f44c2d0a46f87025484552022c0a32d3ce5c7b0
This commit is contained in:
Matthew Noorenberghe 2012-02-09 15:49:33 -08:00
Родитель b20553a2d2
Коммит 99140540e2
2 изменённых файлов: 8 добавлений и 0 удалений

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

@ -38,6 +38,10 @@
#ifdef mozilla_StartupTimeline_Event
mozilla_StartupTimeline_Event(PROCESS_CREATION, "process")
mozilla_StartupTimeline_Event(MAIN, "main")
// Record the beginning and end of startup crash detection to compare with crash stats to know whether
// detection should be improved to start or end sooner.
mozilla_StartupTimeline_Event(STARTUP_CRASH_DETECTION_BEGIN, "startupCrashDetectionBegin")
mozilla_StartupTimeline_Event(STARTUP_CRASH_DETECTION_END, "startupCrashDetectionEnd")
mozilla_StartupTimeline_Event(FIRST_PAINT, "firstPaint")
mozilla_StartupTimeline_Event(SESSION_RESTORED, "sessionRestored")
mozilla_StartupTimeline_Event(CREATE_TOP_LEVEL_WINDOW, "createTopLevelWindow")

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

@ -837,6 +837,8 @@ nsAppStartup::TrackStartupCrashBegin(bool *aIsSafeModeNecessary)
mStartupCrashTrackingEnded = false;
StartupTimeline::Record(StartupTimeline::STARTUP_CRASH_DETECTION_BEGIN);
bool hasLastSuccess = Preferences::HasUserValue(kPrefLastSuccess);
if (!hasLastSuccess) {
// Clear so we don't get stuck with SafeModeNecessary returning true if we
@ -930,6 +932,8 @@ nsAppStartup::TrackStartupCrashEnd()
return NS_OK;
mStartupCrashTrackingEnded = true;
StartupTimeline::Record(StartupTimeline::STARTUP_CRASH_DETECTION_END);
// Use the timestamp of XRE_main as an approximation for the lock file timestamp.
// See MAX_STARTUP_BUFFER for the buffer time period.
nsresult rv;