From 05c2edcf1b0dc31f211bfe5b19862a63291cc751 Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Tue, 30 Aug 2016 19:58:28 +0200 Subject: [PATCH] Backed out changeset 355d9c21953c (bug 1218576) --- toolkit/components/telemetry/Telemetry.cpp | 7 ------- toolkit/components/telemetry/TelemetryHistogram.cpp | 7 ++----- toolkit/components/telemetry/TelemetrySession.jsm | 2 +- toolkit/components/telemetry/nsITelemetry.idl | 6 ------ 4 files changed, 3 insertions(+), 19 deletions(-) diff --git a/toolkit/components/telemetry/Telemetry.cpp b/toolkit/components/telemetry/Telemetry.cpp index fd0c78681fed..6ca49d48e98b 100644 --- a/toolkit/components/telemetry/Telemetry.cpp +++ b/toolkit/components/telemetry/Telemetry.cpp @@ -2369,13 +2369,6 @@ TelemetryImpl::ClearScalars() return NS_OK; } -NS_IMETHODIMP -TelemetryImpl::FlushBatchedChildTelemetry() -{ - TelemetryHistogram::IPCTimerFired(nullptr, nullptr); - return NS_OK; -} - size_t TelemetryImpl::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) { diff --git a/toolkit/components/telemetry/TelemetryHistogram.cpp b/toolkit/components/telemetry/TelemetryHistogram.cpp index 9e34d6e87f9d..5a66f124b74e 100644 --- a/toolkit/components/telemetry/TelemetryHistogram.cpp +++ b/toolkit/components/telemetry/TelemetryHistogram.cpp @@ -2625,11 +2625,8 @@ TelemetryHistogram::GetHistogramSizesofIncludingThis(mozilla::MallocSizeOf // It releases the lock before calling out to IPC code which can (and does) // Accumulate (which would deadlock) // -// To ensure we don't loop IPCTimerFired->AccumulateChild->arm timer, we don't -// unset gIPCTimerArmed until the IPC completes -// -// This function may be re-entered. The shared datastructures gAccumulations and -// gKeyedAccumulations are guarded by the lock. +// To ensure non-reentrancy, the timer is not released until the method +// completes void TelemetryHistogram::IPCTimerFired(nsITimer* aTimer, void* aClosure) { diff --git a/toolkit/components/telemetry/TelemetrySession.jsm b/toolkit/components/telemetry/TelemetrySession.jsm index c20fdbe22d3a..4236146460e3 100644 --- a/toolkit/components/telemetry/TelemetrySession.jsm +++ b/toolkit/components/telemetry/TelemetrySession.jsm @@ -1838,7 +1838,7 @@ var Impl = { // content-child-shutdown is only registered for content processes. Services.obs.removeObserver(this, "content-child-shutdown"); this.uninstall(); - Telemetry.flushBatchedChildTelemetry(); + this.sendContentProcessPing(REASON_SAVED_SESSION); break; case TOPIC_CYCLE_COLLECTOR_BEGIN: diff --git a/toolkit/components/telemetry/nsITelemetry.idl b/toolkit/components/telemetry/nsITelemetry.idl index f7fe51d9f8ce..76a5639ad453 100644 --- a/toolkit/components/telemetry/nsITelemetry.idl +++ b/toolkit/components/telemetry/nsITelemetry.idl @@ -431,10 +431,4 @@ interface nsITelemetry : nsISupports * Resets all the stored scalars. This is intended to be only used in tests. */ void clearScalars(); - - /** - * Immediately sends any Telemetry batched on this process to the parent - * process. This is intended only to be used on process shutdown. - */ - void flushBatchedChildTelemetry(); };