Backed out changeset ee32f39572dd (bug 1312778) for conflicting with a merged bug, causing build bustage a=backout
authorWes Kocher <wkocher@mozilla.com>
Mon, 31 Oct 2016 09:24:55 -0700
changeset 346987 d0f5bb427e0f2d7b0dbc68df53ccca5e151ff16d
parent 346986 b92e6bb8b2c7c43463c7b3f8a83f1b8d4a1df134
child 346988 8fc4e56b3eaae0ce10cc02586d583d9ffcf3e6aa
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1312778
milestone52.0a1
backs outee32f39572dd76c9b6db98831d61b54c668147f5
Backed out changeset ee32f39572dd (bug 1312778) for conflicting with a merged bug, causing build bustage a=backout
toolkit/components/telemetry/TelemetryHistogram.cpp
toolkit/components/telemetry/tests/unit/test_ChildHistograms.js
--- a/toolkit/components/telemetry/TelemetryHistogram.cpp
+++ b/toolkit/components/telemetry/TelemetryHistogram.cpp
@@ -1394,21 +1394,16 @@ void internal_armIPCTimer()
 }
 
 bool
 internal_RemoteAccumulate(mozilla::Telemetry::ID aId, uint32_t aSample)
 {
   if (XRE_IsParentProcess()) {
     return false;
   }
-  Histogram *h;
-  nsresult rv = internal_GetHistogramByEnumId(aId, &h);
-  if (NS_SUCCEEDED(rv) && !h->IsRecordingEnabled()) {
-    return true;
-  }
   if (!gAccumulations) {
     gAccumulations = new nsTArray<Accumulation>();
   }
   if (gAccumulations->Length() == kAccumulationsArrayHighWaterMark) {
     NS_DispatchToMainThread(NS_NewRunnableFunction([]() -> void {
       TelemetryHistogram::IPCTimerFired(nullptr, nullptr);
     }));
   }
@@ -1419,23 +1414,16 @@ internal_RemoteAccumulate(mozilla::Telem
 
 bool
 internal_RemoteAccumulate(mozilla::Telemetry::ID aId,
                     const nsCString& aKey, uint32_t aSample)
 {
   if (XRE_IsParentProcess()) {
     return false;
   }
-  const HistogramInfo& th = gHistograms[aId];
-  KeyedHistogram* keyed
-     = internal_GetKeyedHistogramById(nsDependentCString(th.id()));
-  MOZ_ASSERT(keyed);
-  if (!keyed->IsRecordingEnabled()) {
-    return false;
-  }
   if (!gKeyedAccumulations) {
     gKeyedAccumulations = new nsTArray<KeyedAccumulation>();
   }
   if (gKeyedAccumulations->Length() == kAccumulationsArrayHighWaterMark) {
     NS_DispatchToMainThread(NS_NewRunnableFunction([]() -> void {
       TelemetryHistogram::IPCTimerFired(nullptr, nullptr);
     }));
   }
--- a/toolkit/components/telemetry/tests/unit/test_ChildHistograms.js
+++ b/toolkit/components/telemetry/tests/unit/test_ChildHistograms.js
@@ -13,33 +13,26 @@ const APP_VERSION = "1";
 const APP_ID = "xpcshell@tests.mozilla.org";
 const APP_NAME = "XPCShell";
 
 function run_child_test() {
   // Setup histograms with some fixed values.
   let flagHist = Telemetry.getHistogramById("TELEMETRY_TEST_FLAG");
   flagHist.add(1);
   let countHist = Telemetry.getHistogramById("TELEMETRY_TEST_COUNT");
-  Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_COUNT", false);
-  countHist.add();
-  Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_COUNT", true);
   countHist.add();
   countHist.add();
   let categHist = Telemetry.getHistogramById("TELEMETRY_TEST_CATEGORICAL");
   categHist.add("Label2");
   categHist.add("Label3");
 
   let flagKeyed = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_FLAG");
   flagKeyed.add("a", 1);
   flagKeyed.add("b", 1);
   let countKeyed = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_COUNT");
-  Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_KEYED_COUNT", false);
-  countKeyed.add("a");
-  countKeyed.add("b");
-  Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_KEYED_COUNT", true);
   countKeyed.add("a");
   countKeyed.add("b");
   countKeyed.add("b");
 }
 
 function check_histogram_values(payload) {
   const hs = payload.histograms;
   Assert.ok("TELEMETRY_TEST_COUNT" in hs, "Should have count test histogram.");