Bug 785960 - Add FENNEC_ prefix, and add Telmetry for "Don't keep activities". r=kats
authorGian-Carlo Pascutto <gpascutto@mozilla.com>
Tue, 09 Oct 2012 17:59:44 +0200
changeset 109757 c80a02b9d4780bed291bc030651c06c096f16c6a
parent 109756 c0b4572696b64295fdfc72c9d61e9e76290bddd6
child 109758 1c00efc87bf90093c82bed30e568778769b10c07
push id23652
push userryanvm@gmail.com
push dateWed, 10 Oct 2012 01:10:20 +0000
treeherdermozilla-central@5cca0408a73f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs785960
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 785960 - Add FENNEC_ prefix, and add Telmetry for "Don't keep activities". r=kats
mobile/android/base/GeckoApp.java
toolkit/components/telemetry/Histograms.json
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -1475,16 +1475,17 @@ abstract public class GeckoApp
             enableStrictMode();
         }
 
         GeckoAppShell.loadMozGlue();
         if (sGeckoThread != null) {
             // this happens when the GeckoApp activity is destroyed by android
             // without killing the entire application (see bug 769269)
             mIsRestoringActivity = true;
+            Telemetry.HistogramAdd("FENNEC_RESTORING_ACTIVITY", 1);
         }
 
         mMainHandler = new Handler();
         Log.w(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - onCreate");
 
         LayoutInflater.from(this).setFactory(GeckoViewsFactory.getInstance());
 
         super.onCreate(savedInstanceState);
@@ -1509,30 +1510,30 @@ abstract public class GeckoApp
 
             boolean wasInBackground =
                 savedInstanceState.getBoolean(SAVED_STATE_IN_BACKGROUND, false);
             Log.i(LOGTAG, "Was in background: " + wasInBackground);
 
             // Don't log OOM-kills if only one activity was destroyed. (For example
             // from "Don't keep activities" on ICS)
             if (!wasInBackground && !mIsRestoringActivity) {
-                Telemetry.HistogramAdd("OUT_OF_MEMORY_KILLED", 1);
+                Telemetry.HistogramAdd("FENNEC_WAS_KILLED", 1);
             }
         }
 
         GeckoBackgroundThread.getHandler().post(new Runnable() {
             public void run() {
                 SharedPreferences prefs =
                     GeckoApp.mAppContext.getSharedPreferences(PREFS_NAME, 0);
 
                 boolean wasOOM = prefs.getBoolean(PREFS_OOM_EXCEPTION, false);
                 boolean wasStopped = prefs.getBoolean(PREFS_WAS_STOPPED, true);
                 if (wasOOM || !wasStopped) {
                     Log.i(LOGTAG, "Crashed due to OOM last run");
-                    Telemetry.HistogramAdd("OUT_OF_MEMORY_KILLED", 1);
+                    Telemetry.HistogramAdd("FENNEC_WAS_KILLED", 1);
                 }
                 SharedPreferences.Editor editor = prefs.edit();
                 editor.putBoolean(GeckoApp.PREFS_OOM_EXCEPTION, false);
 
                 // put a flag to check if we got a normal onSaveInstaceState
                 // on exit, or if we were suddenly killed (crash or native OOM)
                 editor.putBoolean(GeckoApp.PREFS_WAS_STOPPED, false);
                 editor.commit();
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -2238,16 +2238,21 @@
   "FENNEC_AWESOMEBAR_ALLPAGES_EMPTY_TIME": {
     "kind": "exponential",
     "low": 10,
     "high": "20000",
     "n_buckets": 20,
     "description": "Fennec: Time for the Awesomebar Top Sites query to return with no filter set (ms)",
     "cpp_guard": "ANDROID"
   },
+  "FENNEC_RESTORING_ACTIVITY": {
+    "kind": "flag",
+    "description": "Fennec is starting up but the Gecko thread was still running",
+    "cpp_guard": "ANDROID"
+  },
   "FENNEC_STARTUP_TIME_JAVAUI": {
     "kind": "exponential",
     "low": 100,
     "high": "5000",
     "n_buckets": 20,
     "description": "Time for the Java UI to load (ms)",
     "cpp_guard": "ANDROID"
   },
@@ -2268,19 +2273,19 @@
     "cpp_guard": "ANDROID"
   },
   "FENNEC_STARTUP_GECKOAPP_ACTION": {
     "kind": "enumerated",
     "n_values": 4,
     "description": "The way the GeckoApp was launched. (Normal, URL, Prefetch, Redirector)",
     "cpp_guard": "ANDROID"
   },
-  "OUT_OF_MEMORY_KILLED": {
+  "FENNEC_WAS_KILLED": {
     "kind": "flag",
-    "description": "Killed due to an OOM condition",
+    "description": "Killed, likely due to an OOM condition",
     "cpp_guard": "ANDROID"
   },
   "SECURITY_UI": {
     "kind": "enumerated",
     "n_values": 100,
     "description": "Security UI Telemetry"
   },
   "SOCIAL_ENABLED_ON_SESSION": {