Commit 9d4b4773 authored by rtenneti's avatar rtenneti Committed by Commit bot

ThreadWacther - delete the code for Android that collected stats for

StartupTimeBombAlarm.

Added a TODO to enable StartupTimeBomb for Android.

Reverting the following two CL's manaually:

https://codereview.chromium.org/269763002
https://codereview.chromium.org/273963002

R=jar@chromium.org
BUG=366699

Review URL: https://codereview.chromium.org/672973002

Cr-Commit-Position: refs/heads/master@{#300972}
parent f07597fa
...@@ -920,13 +920,6 @@ class StartupWatchDogThread : public base::Watchdog { ...@@ -920,13 +920,6 @@ class StartupWatchDogThread : public base::Watchdog {
// alarming. // alarming.
explicit StartupWatchDogThread(const base::TimeDelta& duration) explicit StartupWatchDogThread(const base::TimeDelta& duration)
: base::Watchdog(duration, "Startup watchdog thread", true) { : base::Watchdog(duration, "Startup watchdog thread", true) {
#if defined(OS_ANDROID)
// TODO(rtenneti): Delete this code, after getting data.
start_time_clock_= base::Time::Now();
start_time_monotonic_ = base::TimeTicks::Now();
start_time_thread_now_ = base::TimeTicks::IsThreadNowSupported()
? base::TimeTicks::ThreadNow() : base::TimeTicks::Now();
#endif // OS_ANDROID
} }
// Alarm is called if the time expires after an Arm() without someone calling // Alarm is called if the time expires after an Arm() without someone calling
...@@ -939,29 +932,12 @@ class StartupWatchDogThread : public base::Watchdog { ...@@ -939,29 +932,12 @@ class StartupWatchDogThread : public base::Watchdog {
#elif !defined(OS_ANDROID) #elif !defined(OS_ANDROID)
WatchDogThread::PostTask(FROM_HERE, base::Bind(&StartupHang)); WatchDogThread::PostTask(FROM_HERE, base::Bind(&StartupHang));
return; return;
#else // Android release: gather stats to figure out when to crash. #else
// TODO(rtenneti): Delete this code, after getting data. // TODO(rtenneti): Enable crashing for Android.
UMA_HISTOGRAM_TIMES("StartupTimeBomb.Alarm.TimeDuration",
base::Time::Now() - start_time_clock_);
UMA_HISTOGRAM_TIMES("StartupTimeBomb.Alarm.TimeTicksDuration",
base::TimeTicks::Now() - start_time_monotonic_);
if (base::TimeTicks::IsThreadNowSupported()) {
UMA_HISTOGRAM_TIMES(
"StartupTimeBomb.Alarm.ThreadNowDuration",
base::TimeTicks::ThreadNow() - start_time_thread_now_);
}
return;
#endif // OS_ANDROID #endif // OS_ANDROID
} }
private: private:
#if defined(OS_ANDROID)
// TODO(rtenneti): Delete this code, after getting data.
base::Time start_time_clock_;
base::TimeTicks start_time_monotonic_;
base::TimeTicks start_time_thread_now_;
#endif // OS_ANDROID
DISALLOW_COPY_AND_ASSIGN(StartupWatchDogThread); DISALLOW_COPY_AND_ASSIGN(StartupWatchDogThread);
}; };
......
...@@ -34098,6 +34098,9 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -34098,6 +34098,9 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<histogram name="StartupTimeBomb.Alarm" units="milliseconds"> <histogram name="StartupTimeBomb.Alarm" units="milliseconds">
<owner>rtenneti@chromium.org</owner> <owner>rtenneti@chromium.org</owner>
<obsolete>
Deprecated as of 10/2014.
</obsolete>
<summary> <summary>
Time duration measured from the time the startup timebomb was started and Time duration measured from the time the startup timebomb was started and
when it went off. when it went off.
...@@ -57605,6 +57608,9 @@ To add a new entry, add it with any value and run test to compute valid value. ...@@ -57605,6 +57608,9 @@ To add a new entry, add it with any value and run test to compute valid value.
</histogram_suffixes> </histogram_suffixes>
<histogram_suffixes name="StartupTimeBombAlarm" separator="."> <histogram_suffixes name="StartupTimeBombAlarm" separator=".">
<obsolete>
Deprecated as of 10/2014.
</obsolete>
<suffix name="ThreadNowDuration" label="Duration is in thread CPU time."/> <suffix name="ThreadNowDuration" label="Duration is in thread CPU time."/>
<suffix name="TimeDuration" label="Duration is in clock time."/> <suffix name="TimeDuration" label="Duration is in clock time."/>
<suffix name="TimeTicksDuration" label="Duration is in TimeTicks time."/> <suffix name="TimeTicksDuration" label="Duration is in TimeTicks time."/>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment