diff options
186 files changed, 48 insertions, 2957 deletions
diff --git a/accessible/base/Statistics.h b/accessible/base/Statistics.h index c9f1832b23..f5a9a85b8e 100644 --- a/accessible/base/Statistics.h +++ b/accessible/base/Statistics.h @@ -14,22 +14,22 @@ namespace a11y { namespace statistics { inline void A11yInitialized() - { Telemetry::Accumulate(Telemetry::A11Y_INSTANTIATED_FLAG, true); } + { /* STUB */ } inline void A11yConsumers(uint32_t aConsumer) - { Telemetry::Accumulate(Telemetry::A11Y_CONSUMERS, aConsumer); } + { /* STUB */ } /** * Report that ISimpleDOM* has been used. */ inline void ISimpleDOMUsed() - { Telemetry::Accumulate(Telemetry::A11Y_ISIMPLEDOM_USAGE_FLAG, true); } + { /* STUB */ } /** * Report that IAccessibleTable has been used. */ inline void IAccessibleTableUsed() - { Telemetry::Accumulate(Telemetry::A11Y_IATABLE_USAGE_FLAG, true); } + { /* STUB */ } } // namespace statistics } // namespace a11y diff --git a/devtools/shared/heapsnapshot/HeapSnapshot.cpp b/devtools/shared/heapsnapshot/HeapSnapshot.cpp index 17f43f34e7..ef0bde948b 100644 --- a/devtools/shared/heapsnapshot/HeapSnapshot.cpp +++ b/devtools/shared/heapsnapshot/HeapSnapshot.cpp @@ -28,7 +28,6 @@ #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/HeapSnapshotBinding.h" #include "mozilla/RangedPtr.h" -#include "mozilla/Telemetry.h" #include "mozilla/Unused.h" #include "jsapi.h" @@ -1610,13 +1609,6 @@ ThreadSafeChromeUtils::SaveHeapSnapshot(GlobalObject& global, return; } } - - Telemetry::AccumulateTimeDelta(Telemetry::DEVTOOLS_SAVE_HEAP_SNAPSHOT_MS, - start); - Telemetry::Accumulate(Telemetry::DEVTOOLS_HEAP_SNAPSHOT_NODE_COUNT, - nodeCount); - Telemetry::Accumulate(Telemetry::DEVTOOLS_HEAP_SNAPSHOT_EDGE_COUNT, - edgeCount); } /* static */ already_AddRefed<HeapSnapshot> @@ -1641,10 +1633,6 @@ ThreadSafeChromeUtils::ReadHeapSnapshot(GlobalObject& global, global.Context(), global, reinterpret_cast<const uint8_t*>(mm.address()), mm.size(), rv); - if (!rv.Failed()) - Telemetry::AccumulateTimeDelta(Telemetry::DEVTOOLS_READ_HEAP_SNAPSHOT_MS, - start); - return snapshot.forget(); } diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index f4840297d2..ae307431d9 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -1972,71 +1972,7 @@ nsDocShell::GetCharset(nsACString& aCharset) NS_IMETHODIMP nsDocShell::GatherCharsetMenuTelemetry() { - nsCOMPtr<nsIContentViewer> viewer; - GetContentViewer(getter_AddRefs(viewer)); - if (!viewer) { - return NS_OK; - } - - nsIDocument* doc = viewer->GetDocument(); - if (!doc || doc->WillIgnoreCharsetOverride()) { - return NS_OK; - } - - Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_USED, true); - - bool isFileURL = false; - nsIURI* url = doc->GetOriginalURI(); - if (url) { - url->SchemeIs("file", &isFileURL); - } - - int32_t charsetSource = doc->GetDocumentCharacterSetSource(); - switch (charsetSource) { - case kCharsetFromTopLevelDomain: - // Unlabeled doc on a domain that we map to a fallback encoding - Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 7); - break; - case kCharsetFromFallback: - case kCharsetFromDocTypeDefault: - case kCharsetFromCache: - case kCharsetFromParentFrame: - case kCharsetFromHintPrevDoc: - // Changing charset on an unlabeled doc. - if (isFileURL) { - Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 0); - } else { - Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 1); - } - break; - case kCharsetFromAutoDetection: - // Changing charset on unlabeled doc where chardet fired - if (isFileURL) { - Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 2); - } else { - Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 3); - } - break; - case kCharsetFromMetaPrescan: - case kCharsetFromMetaTag: - case kCharsetFromChannel: - // Changing charset on a doc that had a charset label. - Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 4); - break; - case kCharsetFromParentForced: - case kCharsetFromUserForced: - // Changing charset on a document that already had an override. - Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 5); - break; - case kCharsetFromIrreversibleAutoDetection: - case kCharsetFromOtherComponent: - case kCharsetFromByteOrderMark: - case kCharsetUninitialized: - default: - // Bug. This isn't supposed to happen. - Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 6); - break; - } + /* STUB */ return NS_OK; } @@ -5062,10 +4998,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI, errorPage.Assign(alternateErrorPage); } - if (!IsFrame() && errorPage.EqualsIgnoreCase("certerror")) { - Telemetry::Accumulate(mozilla::Telemetry::SECURITY_UI, bucketId); - } - } else { error.AssignLiteral("nssFailure2"); } @@ -5105,10 +5037,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI, : nsISecurityUITelemetry::WARNING_UNWANTED_PAGE_TOP; } - if (sendTelemetry && errorPage.EqualsIgnoreCase("blocked")) { - Telemetry::Accumulate(Telemetry::SECURITY_UI, bucketId); - } - cssClass.AssignLiteral("blacklist"); } else if (NS_ERROR_CONTENT_CRASHED == aError) { errorPage.AssignLiteral("tabcrashed"); @@ -7622,8 +7550,6 @@ nsDocShell::EndPageLoad(nsIWebProgress* aProgress, TimeStamp channelCreationTime; rv = timingChannel->GetChannelCreation(&channelCreationTime); if (NS_SUCCEEDED(rv) && !channelCreationTime.IsNull()) { - Telemetry::AccumulateTimeDelta(Telemetry::TOTAL_CONTENT_PAGE_LOAD_TIME, - channelCreationTime); nsCOMPtr<nsPILoadGroupInternal> internalLoadGroup = do_QueryInterface(mLoadGroup); if (internalLoadGroup) { diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index d125e5ad1c..1cfde6e1bb 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -49,7 +49,6 @@ #include "nsContentUtils.h" #include "nsIDOMGlobalPropertyInitializer.h" #include "mozilla/Attributes.h" -#include "mozilla/Telemetry.h" // Window scriptable helper includes #include "nsScriptNameSpaceManager.h" @@ -1903,9 +1902,6 @@ LookupComponentsShim(JSContext *cx, JS::Handle<JSObject*> global, nsPIDOMWindowInner *win, JS::MutableHandle<JS::PropertyDescriptor> desc) { - // Keep track of how often this happens. - Telemetry::Accumulate(Telemetry::COMPONENTS_SHIM_ACCESSED_BY_CONTENT, true); - // Warn once. nsCOMPtr<nsIDocument> doc = win->GetExtantDoc(); if (doc) { diff --git a/dom/base/nsDOMNavigationTiming.cpp b/dom/base/nsDOMNavigationTiming.cpp index 32ce8a8cb0..9c732f2d8c 100644 --- a/dom/base/nsDOMNavigationTiming.cpp +++ b/dom/base/nsDOMNavigationTiming.cpp @@ -15,7 +15,6 @@ #include "nsPrintfCString.h" #include "mozilla/dom/PerformanceNavigation.h" #include "mozilla/TimeStamp.h" -#include "mozilla/Telemetry.h" using namespace mozilla; @@ -203,12 +202,6 @@ nsDOMNavigationTiming::NotifyNonBlankPaintForRootContentDocument() mDocShellHasBeenActiveSinceNavigationStart ? "foreground tab" : "this tab was inactive some of the time between navigation start and first non-blank paint"); PROFILER_MARKER(marker.get()); } - - if (mDocShellHasBeenActiveSinceNavigationStart) { - Telemetry::AccumulateTimeDelta(Telemetry::TIME_TO_NON_BLANK_PAINT_MS, - mNavigationStart, - mNonBlankPaint); - } } void diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 8acfd901a9..ac9601caf1 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -25,7 +25,6 @@ #include "plstr.h" #include "mozilla/Sprintf.h" -#include "mozilla/Telemetry.h" #include "nsIInterfaceRequestor.h" #include "nsIInterfaceRequestorUtils.h" #include "nsILoadContext.h" @@ -12370,101 +12369,7 @@ MightBeAboutOrChromeScheme(nsIURI* aURI) void nsDocument::ReportUseCounters() { - static const bool sDebugUseCounters = false; - if (mReportedUseCounters) { - return; - } - - mReportedUseCounters = true; - - if (Telemetry::HistogramUseCounterCount > 0 && - (IsContentDocument() || IsResourceDoc())) { - nsCOMPtr<nsIURI> uri; - NodePrincipal()->GetURI(getter_AddRefs(uri)); - if (!uri || MightBeAboutOrChromeScheme(uri)) { - return; - } - - if (sDebugUseCounters) { - nsCString spec = uri->GetSpecOrDefault(); - - // URIs can be rather long for data documents, so truncate them to - // some reasonable length. - spec.Truncate(std::min(128U, spec.Length())); - printf("-- Use counters for %s --\n", spec.get()); - } - - // We keep separate counts for individual documents and top-level - // pages to more accurately track how many web pages might break if - // certain features were removed. Consider the case of a single - // HTML document with several SVG images and/or iframes with - // sub-documents of their own. If we maintained a single set of use - // counters and all the sub-documents use a particular feature, then - // telemetry would indicate that we would be breaking N documents if - // that feature were removed. Whereas with a document/top-level - // page split, we can see that N documents would be affected, but - // only a single web page would be affected. - - // The difference between the values of these two histograms and the - // related use counters below tell us how many pages did *not* use - // the feature in question. For instance, if we see that a given - // session has destroyed 30 content documents, but a particular use - // counter shows only a count of 5, we can infer that the use - // counter was *not* used in 25 of those 30 documents. - // - // We do things this way, rather than accumulating a boolean flag - // for each use counter, to avoid sending histograms for features - // that don't get widely used. Doing things in this fashion means - // smaller telemetry payloads and faster processing on the server - // side. - Telemetry::Accumulate(Telemetry::CONTENT_DOCUMENTS_DESTROYED, 1); - if (IsTopLevelContentDocument()) { - Telemetry::Accumulate(Telemetry::TOP_LEVEL_CONTENT_DOCUMENTS_DESTROYED, 1); - } - - for (int32_t c = 0; - c < eUseCounter_Count; ++c) { - UseCounter uc = static_cast<UseCounter>(c); - - Telemetry::ID id = - static_cast<Telemetry::ID>(Telemetry::HistogramFirstUseCounter + uc * 2); - bool value = GetUseCounter(uc); - - if (value) { - if (sDebugUseCounters) { - const char* name = Telemetry::GetHistogramName(id); - if (name) { - printf(" %s", name); - } else { - printf(" #%d", id); - } - printf(": %d\n", value); - } - - Telemetry::Accumulate(id, 1); - } - - if (IsTopLevelContentDocument()) { - id = static_cast<Telemetry::ID>(Telemetry::HistogramFirstUseCounter + - uc * 2 + 1); - value = GetUseCounter(uc) || GetChildDocumentUseCounter(uc); - - if (value) { - if (sDebugUseCounters) { - const char* name = Telemetry::GetHistogramName(id); - if (name) { - printf(" %s", name); - } else { - printf(" #%d", id); - } - printf(": %d\n", value); - } - - Telemetry::Accumulate(id, 1); - } - } - } - } +/* STUB */ } void diff --git a/dom/base/nsFrameMessageManager.cpp b/dom/base/nsFrameMessageManager.cpp index 6fffd376b2..f173678b74 100644 --- a/dom/base/nsFrameMessageManager.cpp +++ b/dom/base/nsFrameMessageManager.cpp @@ -32,7 +32,6 @@ #include "mozilla/CycleCollectedJSContext.h" #include "mozilla/IntentionalCrash.h" #include "mozilla/Preferences.h" -#include "mozilla/Telemetry.h" #include "mozilla/dom/File.h" #include "mozilla/dom/MessagePort.h" #include "mozilla/dom/nsIContentParent.h" @@ -716,9 +715,6 @@ AllowMessage(size_t aDataLength, const nsAString& aMessageName) NS_ConvertUTF16toUTF8 messageName(aMessageName); messageName.StripChars("0123456789"); - Telemetry::Accumulate(Telemetry::MESSAGE_MANAGER_MESSAGE_SIZE2, messageName, - aDataLength); - // A message includes more than structured clone data, so subtract // 20KB to make it more likely that a message within this bound won't // result in an overly large IPC message. @@ -727,9 +723,6 @@ AllowMessage(size_t aDataLength, const nsAString& aMessageName) return true; } - Telemetry::Accumulate(Telemetry::REJECTED_MESSAGE_MANAGER_MESSAGE, - messageName); - return false; } @@ -2248,7 +2241,6 @@ nsSameProcessAsyncMessageBase::Init(const nsAString& aMessage, nsIPrincipal* aPrincipal) { if (!mData.Copy(aData)) { - Telemetry::Accumulate(Telemetry::IPC_SAME_PROCESS_MESSAGE_COPY_OOM_KB, aData.DataLength()); return NS_ERROR_OUT_OF_MEMORY; } diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 884ad69ca5..88cebe42b5 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -211,7 +211,6 @@ #include "mozilla/AddonPathService.h" #include "mozilla/BasePrincipal.h" #include "mozilla/Services.h" -#include "mozilla/Telemetry.h" #include "mozilla/dom/Location.h" #include "nsHTMLDocument.h" #include "nsWrapperCacheInlines.h" @@ -1759,9 +1758,6 @@ nsGlobalWindow::~nsGlobalWindow() DropOuterWindowDocs(); } else { - Telemetry::Accumulate(Telemetry::INNERWINDOWS_WITH_MUTATION_LISTENERS, - mMutationBits ? 1 : 0); - if (mListenerManager) { mListenerManager->Disconnect(); mListenerManager = nullptr; @@ -2695,7 +2691,6 @@ TreatAsRemoteXUL(nsIPrincipal* aPrincipal) static bool EnablePrivilege(JSContext* cx, unsigned argc, JS::Value* vp) { - Telemetry::Accumulate(Telemetry::ENABLE_PRIVILEGE_EVER_CALLED, true); return xpc::EnableUniversalXPConnect(cx); } @@ -3389,9 +3384,6 @@ nsGlobalWindow::InnerSetNewDocument(JSContext* aCx, nsIDocument* aDocument) mLastOpenedURI = aDocument->GetDocumentURI(); #endif - Telemetry::Accumulate(Telemetry::INNERWINDOWS_WITH_MUTATION_LISTENERS, - mMutationBits ? 1 : 0); - // Clear our mutation bitfield. mMutationBits = 0; } @@ -6848,8 +6840,6 @@ FullscreenTransitionTask::Run() Preferences::GetUint("full-screen-api.transition.timeout", 1000); mTimer->Init(observer, timeout, nsITimer::TYPE_ONE_SHOT); } else if (stage == eAfterToggle) { - Telemetry::AccumulateTimeDelta(Telemetry::FULLSCREEN_TRANSITION_BLACK_MS, - mFullscreenChangeStartTime); mWidget->PerformFullscreenTransition(nsIWidget::eAfterFullscreenToggle, mDuration.mFadeOut, mTransitionData, this); @@ -11577,11 +11567,6 @@ nsGlobalWindow::ShowSlowScriptDialog() unsigned lineno; bool hasFrame = JS::DescribeScriptedCaller(cx, &filename, &lineno); - // Record the slow script event if we haven't done so already for this inner window - // (which represents a particular page to the user). - if (!mHasHadSlowScript) { - Telemetry::Accumulate(Telemetry::SLOW_SCRIPT_PAGE_COUNT, 1); - } mHasHadSlowScript = true; if (XRE_IsContentProcess() && @@ -11613,10 +11598,6 @@ nsGlobalWindow::ShowSlowScriptDialog() return ContinueSlowScriptAndKeepNotifying; } - // Reached only on non-e10s - once per slow script dialog. - // On e10s - we probe once at ProcessHangsMonitor.jsm - Telemetry::Accumulate(Telemetry::SLOW_SCRIPT_NOTICE_COUNT, 1); - // Get the nsIPrompt interface from the docshell nsCOMPtr<nsIDocShell> ds = GetDocShell(); NS_ENSURE_TRUE(ds, KillSlowScript); diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index 3be1a6d2f4..4a984d294d 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -70,7 +70,6 @@ #include "prthread.h" #include "mozilla/Preferences.h" -#include "mozilla/Telemetry.h" #include "mozilla/dom/BindingUtils.h" #include "mozilla/Attributes.h" #include "mozilla/dom/asmjscache/AsmJSCache.h" @@ -1477,22 +1476,8 @@ nsJSContext::EndCycleCollectionCallback(CycleCollectorResults &aResults) NS_GC_DELAY - std::min(ccNowDuration, kMaxICCDuration)); } - // Log information about the CC via telemetry, JSON and the console. - Telemetry::Accumulate(Telemetry::CYCLE_COLLECTOR_FINISH_IGC, gCCStats.mAnyLockedOut); - Telemetry::Accumulate(Telemetry::CYCLE_COLLECTOR_SYNC_SKIPPABLE, gCCStats.mRanSyncForgetSkippable); - Telemetry::Accumulate(Telemetry::CYCLE_COLLECTOR_FULL, ccNowDuration); - Telemetry::Accumulate(Telemetry::CYCLE_COLLECTOR_MAX_PAUSE, gCCStats.mMaxSliceTime); - - if (!sLastCCEndTime.IsNull()) { - // TimeBetween returns milliseconds, but we want to report seconds. - uint32_t timeBetween = TimeBetween(sLastCCEndTime, gCCStats.mBeginTime) / 1000; - Telemetry::Accumulate(Telemetry::CYCLE_COLLECTOR_TIME_BETWEEN, timeBetween); - } sLastCCEndTime = endCCTimeStamp; - Telemetry::Accumulate(Telemetry::FORGET_SKIPPABLE_MAX, - sMaxForgetSkippableTime / PR_USEC_PER_MSEC); - PRTime delta = GetCollectionTimeDelta(); uint32_t cleanups = sForgetSkippableBeforeCC ? sForgetSkippableBeforeCC : 1; diff --git a/dom/base/nsNodeInfoManager.cpp b/dom/base/nsNodeInfoManager.cpp index 66c8c84cfd..80f0aa786b 100644 --- a/dom/base/nsNodeInfoManager.cpp +++ b/dom/base/nsNodeInfoManager.cpp @@ -392,9 +392,6 @@ nsNodeInfoManager::SetDocumentPrincipal(nsIPrincipal *aPrincipal) NS_ASSERTION(aPrincipal, "Must have principal by this point!"); MOZ_DIAGNOSTIC_ASSERT(!nsContentUtils::IsExpandedPrincipal(aPrincipal), "Documents shouldn't have an expanded principal"); - if (nsContentUtils::IsExpandedPrincipal(aPrincipal)) { - Telemetry::Accumulate(Telemetry::DOCUMENT_WITH_EXPANDED_PRINCIPAL, 1); - } mPrincipal = aPrincipal; } diff --git a/dom/base/nsObjectLoadingContent.cpp b/dom/base/nsObjectLoadingContent.cpp index 9e9dacf014..709c7aa56c 100644 --- a/dom/base/nsObjectLoadingContent.cpp +++ b/dom/base/nsObjectLoadingContent.cpp @@ -85,7 +85,6 @@ #include "mozilla/AsyncEventDispatcher.h" #include "mozilla/EventDispatcher.h" #include "mozilla/EventStates.h" -#include "mozilla/Telemetry.h" #include "mozilla/dom/HTMLObjectElementBinding.h" #include "mozilla/dom/HTMLSharedObjectElement.h" #include "nsChannelClassifier.h" @@ -1149,7 +1148,6 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest, NS_LITERAL_STRING(" since it was found on an internal Firefox blocklist."); console->LogStringMessage(message.get()); } - Telemetry::Accumulate(Telemetry::PLUGIN_BLOCKED_FOR_STABILITY, 1); mContentBlockingEnabled = true; return NS_ERROR_FAILURE; } else if (status == NS_ERROR_TRACKING_URI) { @@ -1565,7 +1563,6 @@ nsObjectLoadingContent::MaybeRewriteYoutubeEmbed(nsIURI* aURI, nsIURI* aBaseURI, } if (uri.Find("enablejsapi=1", true, 0, -1) != kNotFound) { - Telemetry::Accumulate(Telemetry::YOUTUBE_NONREWRITABLE_EMBED_SEEN, 1); return; } @@ -1585,10 +1582,6 @@ nsObjectLoadingContent::MaybeRewriteYoutubeEmbed(nsIURI* aURI, nsIURI* aBaseURI, } } - // If we've made it this far, we've got a rewritable embed. Log it in - // telemetry. - Telemetry::Accumulate(Telemetry::YOUTUBE_REWRITABLE_EMBED_SEEN, 1); - // If we're pref'd off, return after telemetry has been logged. if (!Preferences::GetBool(kPrefYoutubeRewrite)) { return; @@ -3800,8 +3793,6 @@ nsObjectLoadingContent::LegacyCall(JSContext* aCx, aRv.Throw(NS_ERROR_FAILURE); return; } - - Telemetry::Accumulate(Telemetry::PLUGIN_CALLED_DIRECTLY, true); } void diff --git a/dom/canvas/CanvasRenderingContextHelper.cpp b/dom/canvas/CanvasRenderingContextHelper.cpp index 3000e59bdf..61317fb515 100644 --- a/dom/canvas/CanvasRenderingContextHelper.cpp +++ b/dom/canvas/CanvasRenderingContextHelper.cpp @@ -7,7 +7,6 @@ #include "ImageBitmapRenderingContext.h" #include "ImageEncoder.h" #include "mozilla/dom/CanvasRenderingContext2D.h" -#include "mozilla/Telemetry.h" #include "mozilla/UniquePtr.h" #include "nsContentUtils.h" #include "nsDOMJSUtils.h" @@ -138,13 +137,10 @@ CanvasRenderingContextHelper::CreateContextHelper(CanvasContextType aContextType break; case CanvasContextType::Canvas2D: - Telemetry::Accumulate(Telemetry::CANVAS_2D_USED, 1); ret = new CanvasRenderingContext2D(aCompositorBackend); break; case CanvasContextType::WebGL1: - Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_USED, 1); - ret = WebGL1Context::Create(); if (!ret) return nullptr; @@ -152,8 +148,6 @@ CanvasRenderingContextHelper::CreateContextHelper(CanvasContextType aContextType break; case CanvasContextType::WebGL2: - Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_USED, 1); - ret = WebGL2Context::Create(); if (!ret) return nullptr; @@ -205,16 +199,8 @@ CanvasRenderingContextHelper::GetContext(JSContext* aCx, // See bug 645792 and bug 1215072. // We want to throw only if dictionary initialization fails, // so only in case aRv has been set to some error value. - if (contextType == CanvasContextType::WebGL1) - Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_SUCCESS, 0); - else if (contextType == CanvasContextType::WebGL2) - Telemetry::Accumulate(Telemetry::CANVAS_WEBGL2_SUCCESS, 0); return nullptr; } - if (contextType == CanvasContextType::WebGL1) - Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_SUCCESS, 1); - else if (contextType == CanvasContextType::WebGL2) - Telemetry::Accumulate(Telemetry::CANVAS_WEBGL2_SUCCESS, 1); } else { // We already have a context of some type. if (contextType != mCurrentContextType) diff --git a/dom/canvas/WebGL1Context.cpp b/dom/canvas/WebGL1Context.cpp index c1818a3f95..e82cafbe5c 100644 --- a/dom/canvas/WebGL1Context.cpp +++ b/dom/canvas/WebGL1Context.cpp @@ -6,7 +6,6 @@ #include "WebGL1Context.h" #include "mozilla/dom/WebGLRenderingContextBinding.h" -#include "mozilla/Telemetry.h" #include "WebGLFormats.h" namespace mozilla { @@ -43,8 +42,6 @@ WebGL1Context::WrapObject(JSContext* cx, JS::Handle<JSObject*> givenProto) nsresult NS_NewCanvasRenderingContextWebGL(nsIDOMWebGLRenderingContext** out_result) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::CANVAS_WEBGL_USED, 1); - nsIDOMWebGLRenderingContext* ctx = mozilla::WebGL1Context::Create(); NS_ADDREF(*out_result = ctx); diff --git a/dom/canvas/WebGLContext.cpp b/dom/canvas/WebGLContext.cpp index 32eed63541..14bc7e3e3d 100644 --- a/dom/canvas/WebGLContext.cpp +++ b/dom/canvas/WebGLContext.cpp @@ -825,10 +825,6 @@ NS_IMETHODIMP WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight) { if (signedWidth < 0 || signedHeight < 0) { - if (!gl) { - Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_FAILURE_ID, - NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_SIZE")); - } GenerateWarning("Canvas size is too large (seems like a negative value wrapped)"); return NS_ERROR_OUT_OF_MEMORY; } @@ -884,12 +880,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight) return NS_OK; } - nsCString failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_UNKOWN"); - auto autoTelemetry = mozilla::MakeScopeExit([&] { - Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_FAILURE_ID, - failureId); - }); - // End of early return cases. // At this point we know that we're not just resizing an existing context, // we are initializing a new context. @@ -911,7 +901,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight) // resource handles created from older context generations. if (!(mGeneration + 1).isValid()) { // exit without changing the value of mGeneration - failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_TOO_MANY"); const nsLiteralCString text("Too many WebGL contexts created this run."); ThrowEvent_WebGLContextCreationError(text); return NS_ERROR_FAILURE; @@ -928,11 +917,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight) disabled |= gfxPlatform::InSafeMode(); if (disabled) { - if (gfxPlatform::InSafeMode()) { - failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_SAFEMODE"); - } else { - failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_DISABLED"); - } const nsLiteralCString text("WebGL is currently disabled."); ThrowEvent_WebGLContextCreationError(text); return NS_ERROR_FAILURE; @@ -945,7 +929,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight) if (mOptions.failIfMajorPerformanceCaveat) { nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo(); if (!HasAcceleratedLayers(gfxInfo)) { - failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_PERF_CAVEAT"); const nsLiteralCString text("failIfMajorPerformanceCaveat: Compositor is not" " hardware-accelerated."); ThrowEvent_WebGLContextCreationError(text); @@ -961,12 +944,9 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight) if (!CreateAndInitGL(forceEnabled, &failReasons)) { nsCString text("WebGL creation failed: "); for (const auto& cur : failReasons) { - Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_FAILURE_ID, cur.key); - text.AppendASCII("\n* "); text.Append(cur.info); } - failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_REASON"); ThrowEvent_WebGLContextCreationError(text); return NS_ERROR_FAILURE; } @@ -978,7 +958,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight) DestroyResourcesAndContext(); MOZ_ASSERT(!gl); - failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_PERF_WARP"); const nsLiteralCString text("failIfMajorPerformanceCaveat: Driver is not" " hardware-accelerated."); ThrowEvent_WebGLContextCreationError(text); @@ -992,7 +971,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight) DestroyResourcesAndContext(); MOZ_ASSERT(!gl); - failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_DXGL_INTEROP2"); const nsLiteralCString text("Caveat: WGL without DXGLInterop2."); ThrowEvent_WebGLContextCreationError(text); return NS_ERROR_FAILURE; @@ -1001,7 +979,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight) } if (!ResizeBackbuffer(width, height)) { - failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_BACKBUFFER"); const nsLiteralCString text("Initializing WebGL backbuffer failed."); ThrowEvent_WebGLContextCreationError(text); return NS_ERROR_FAILURE; @@ -1085,7 +1062,6 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight) ////// - failureId = NS_LITERAL_CSTRING("SUCCESS"); return NS_OK; } diff --git a/dom/crypto/WebCryptoTask.cpp b/dom/crypto/WebCryptoTask.cpp index f5fc7b5bc9..c4cc7080da 100644 --- a/dom/crypto/WebCryptoTask.cpp +++ b/dom/crypto/WebCryptoTask.cpp @@ -452,7 +452,6 @@ void WebCryptoTask::FailWithError(nsresult aRv) { MOZ_ASSERT(IsOnOriginalThread()); - Telemetry::Accumulate(Telemetry::WEBCRYPTO_RESOLVED, false); // Blindly convert nsresult to DOMException // Individual tasks must ensure they pass the right values @@ -491,7 +490,6 @@ WebCryptoTask::CallCallback(nsresult rv) } Resolve(); - Telemetry::Accumulate(Telemetry::WEBCRYPTO_RESOLVED, true); // Manually release mResultPromise while we're on the main thread mResultPromise = nullptr; @@ -650,7 +648,6 @@ public: mEarlyRv = NS_ERROR_DOM_NOT_SUPPORTED_ERR; return; } - Telemetry::Accumulate(Telemetry::WEBCRYPTO_ALG, telemetryAlg); } private: @@ -794,7 +791,6 @@ public: return; } - Telemetry::Accumulate(Telemetry::WEBCRYPTO_ALG, TA_AES_KW); } private: @@ -908,8 +904,6 @@ public: void Init(JSContext* aCx, const ObjectOrString& aAlgorithm, CryptoKey& aKey, bool aEncrypt) { - Telemetry::Accumulate(Telemetry::WEBCRYPTO_ALG, TA_RSA_OAEP); - CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_RSA_OAEP); if (mEncrypt) { @@ -1049,7 +1043,6 @@ public: case CKM_SHA512_HMAC: telemetryAlg = TA_HMAC_SHA_512; break; default: telemetryAlg = TA_UNKNOWN; } - Telemetry::Accumulate(Telemetry::WEBCRYPTO_ALG, telemetryAlg); } private: @@ -1158,12 +1151,10 @@ public: if (algName.EqualsLiteral(WEBCRYPTO_ALG_RSASSA_PKCS1)) { mAlgorithm = Algorithm::RSA_PKCS1; - Telemetry::Accumulate(Telemetry::WEBCRYPTO_ALG, TA_RSASSA_PKCS1); CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_RSASSA_PKCS1); hashAlgName = aKey.Algorithm().mRsa.mHash.mName; } else if (algName.EqualsLiteral(WEBCRYPTO_ALG_RSA_PSS)) { mAlgorithm = Algorithm::RSA_PSS; - Telemetry::Accumulate(Telemetry::WEBCRYPTO_ALG, TA_RSA_PSS); CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_RSA_PSS); KeyAlgorithm& hashAlg = aKey.Algorithm().mRsa.mHash; @@ -1188,7 +1179,6 @@ public: mSaltLength = params.mSaltLength; } else if (algName.EqualsLiteral(WEBCRYPTO_ALG_ECDSA)) { mAlgorithm = Algorithm::ECDSA; - Telemetry::Accumulate(Telemetry::WEBCRYPTO_ALG, TA_ECDSA); CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_ECDSA); // For ECDSA, the hash name comes from the algorithm parameter @@ -1356,7 +1346,6 @@ public: mEarlyRv = NS_ERROR_DOM_SYNTAX_ERR; return; } - Telemetry::Accumulate(Telemetry::WEBCRYPTO_ALG, telemetryAlg); mOidTag = MapHashAlgorithmNameToOID(algName); } @@ -2656,7 +2645,6 @@ public: void Init(JSContext* aCx, const ObjectOrString& aAlgorithm, CryptoKey& aKey, uint32_t aLength) { - Telemetry::Accumulate(Telemetry::WEBCRYPTO_ALG, TA_HKDF); CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_HKDF); // Check that we have a key. @@ -2806,7 +2794,6 @@ public: void Init(JSContext* aCx, const ObjectOrString& aAlgorithm, CryptoKey& aKey, uint32_t aLength) { - Telemetry::Accumulate(Telemetry::WEBCRYPTO_ALG, TA_PBKDF2); CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_PBKDF2); // Check that we got a symmetric key @@ -2981,7 +2968,6 @@ public: void Init(JSContext* aCx, const ObjectOrString& aAlgorithm, CryptoKey& aKey) { - Telemetry::Accumulate(Telemetry::WEBCRYPTO_ALG, TA_ECDH); CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_ECDH); // Check that we have a private key. @@ -3277,10 +3263,6 @@ WebCryptoTask::CreateEncryptDecryptTask(JSContext* aCx, const CryptoOperationData& aData, bool aEncrypt) { - TelemetryMethod method = (aEncrypt)? TM_ENCRYPT : TM_DECRYPT; - Telemetry::Accumulate(Telemetry::WEBCRYPTO_METHOD, method); - Telemetry::Accumulate(Telemetry::WEBCRYPTO_EXTRACTABLE_ENC, aKey.Extractable()); - // Ensure key is usable for this operation if ((aEncrypt && !aKey.HasUsage(CryptoKey::ENCRYPT)) || (!aEncrypt && !aKey.HasUsage(CryptoKey::DECRYPT))) { @@ -3312,10 +3294,6 @@ WebCryptoTask::CreateSignVerifyTask(JSContext* aCx, const CryptoOperationData& aData, bool aSign) { - TelemetryMethod method = (aSign)? TM_SIGN : TM_VERIFY; - Telemetry::Accumulate(Telemetry::WEBCRYPTO_METHOD, method); - Telemetry::Accumulate(Telemetry::WEBCRYPTO_EXTRACTABLE_SIG, aKey.Extractable()); - // Ensure key is usable for this operation if ((aSign && !aKey.HasUsage(CryptoKey::SIGN)) || (!aSign && !aKey.HasUsage(CryptoKey::VERIFY))) { @@ -3345,8 +3323,6 @@ WebCryptoTask::CreateDigestTask(JSContext* aCx, const ObjectOrString& aAlgorithm, const CryptoOperationData& aData) { - Telemetry::Accumulate(Telemetry::WEBCRYPTO_METHOD, TM_DIGEST); - nsString algName; nsresult rv = GetAlgorithmName(aCx, aAlgorithm, algName); if (NS_FAILED(rv)) { @@ -3372,9 +3348,6 @@ WebCryptoTask::CreateImportKeyTask(nsIGlobalObject* aGlobal, bool aExtractable, const Sequence<nsString>& aKeyUsages) { - Telemetry::Accumulate(Telemetry::WEBCRYPTO_METHOD, TM_IMPORTKEY); - Telemetry::Accumulate(Telemetry::WEBCRYPTO_EXTRACTABLE_IMPORT, aExtractable); - // Verify that the format is recognized if (!aFormat.EqualsLiteral(WEBCRYPTO_KEY_FORMAT_RAW) && !aFormat.EqualsLiteral(WEBCRYPTO_KEY_FORMAT_SPKI) && @@ -3426,8 +3399,6 @@ WebCryptoTask* WebCryptoTask::CreateExportKeyTask(const nsAString& aFormat, CryptoKey& aKey) { - Telemetry::Accumulate(Telemetry::WEBCRYPTO_METHOD, TM_EXPORTKEY); - // Verify that the format is recognized if (!aFormat.EqualsLiteral(WEBCRYPTO_KEY_FORMAT_RAW) && !aFormat.EqualsLiteral(WEBCRYPTO_KEY_FORMAT_SPKI) && @@ -3470,9 +3441,6 @@ WebCryptoTask::CreateGenerateKeyTask(nsIGlobalObject* aGlobal, bool aExtractable, const Sequence<nsString>& aKeyUsages) { - Telemetry::Accumulate(Telemetry::WEBCRYPTO_METHOD, TM_GENERATEKEY); - Telemetry::Accumulate(Telemetry::WEBCRYPTO_EXTRACTABLE_GENERATE, aExtractable); - // Verify that aKeyUsages does not contain an unrecognized value // SPEC-BUG: Spec says that this should be InvalidAccessError, but that // is inconsistent with other analogous points in the spec @@ -3515,8 +3483,6 @@ WebCryptoTask::CreateDeriveKeyTask(nsIGlobalObject* aGlobal, bool aExtractable, const Sequence<nsString>& aKeyUsages) { - Telemetry::Accumulate(Telemetry::WEBCRYPTO_METHOD, TM_DERIVEKEY); - // Ensure baseKey is usable for this operation if (!aBaseKey.HasUsage(CryptoKey::DERIVEKEY)) { return new FailureTask(NS_ERROR_DOM_INVALID_ACCESS_ERR); @@ -3560,8 +3526,6 @@ WebCryptoTask::CreateDeriveBitsTask(JSContext* aCx, CryptoKey& aKey, uint32_t aLength) { - Telemetry::Accumulate(Telemetry::WEBCRYPTO_METHOD, TM_DERIVEBITS); - // Ensure baseKey is usable for this operation if (!aKey.HasUsage(CryptoKey::DERIVEBITS)) { return new FailureTask(NS_ERROR_DOM_INVALID_ACCESS_ERR); @@ -3599,8 +3563,6 @@ WebCryptoTask::CreateWrapKeyTask(JSContext* aCx, CryptoKey& aWrappingKey, const ObjectOrString& aWrapAlgorithm) { - Telemetry::Accumulate(Telemetry::WEBCRYPTO_METHOD, TM_WRAPKEY); - // Verify that the format is recognized if (!aFormat.EqualsLiteral(WEBCRYPTO_KEY_FORMAT_RAW) && !aFormat.EqualsLiteral(WEBCRYPTO_KEY_FORMAT_SPKI) && @@ -3652,8 +3614,6 @@ WebCryptoTask::CreateUnwrapKeyTask(nsIGlobalObject* aGlobal, bool aExtractable, const Sequence<nsString>& aKeyUsages) { - Telemetry::Accumulate(Telemetry::WEBCRYPTO_METHOD, TM_UNWRAPKEY); - // Ensure key is usable for this operation if (!aUnwrappingKey.HasUsage(CryptoKey::UNWRAPKEY)) { return new FailureTask(NS_ERROR_DOM_INVALID_ACCESS_ERR); diff --git a/dom/events/EventDispatcher.cpp b/dom/events/EventDispatcher.cpp index 65f01844b9..1d4dfd7d9f 100644 --- a/dom/events/EventDispatcher.cpp +++ b/dom/events/EventDispatcher.cpp @@ -858,63 +858,46 @@ EventDispatcher::CreateEvent(EventTarget* aOwner, // And if we didn't get an event, check the type argument. -#define LOG_EVENT_CREATION(name) mozilla::Telemetry::Accumulate( \ - mozilla::Telemetry::CREATE_EVENT_##name, true); - if (aEventType.LowerCaseEqualsLiteral("mouseevent")) { - LOG_EVENT_CREATION(MOUSEEVENT); return NS_NewDOMMouseEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("mouseevents")) { - LOG_EVENT_CREATION(MOUSEEVENTS); return NS_NewDOMMouseEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("popupevents")) { - LOG_EVENT_CREATION(POPUPEVENTS); return NS_NewDOMMouseEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("mousescrollevents")) { - LOG_EVENT_CREATION(MOUSESCROLLEVENTS); return NS_NewDOMMouseScrollEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("dragevent")) { - LOG_EVENT_CREATION(DRAGEVENT); return NS_NewDOMDragEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("dragevents")) { - LOG_EVENT_CREATION(DRAGEVENTS); return NS_NewDOMDragEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("keyboardevent")) { - LOG_EVENT_CREATION(KEYBOARDEVENT); return NS_NewDOMKeyboardEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("keyevents")) { - LOG_EVENT_CREATION(KEYEVENTS); return NS_NewDOMKeyboardEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("compositionevent")) { - LOG_EVENT_CREATION(COMPOSITIONEVENT); return NS_NewDOMCompositionEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("textevent")) { - LOG_EVENT_CREATION(TEXTEVENT); return NS_NewDOMCompositionEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("textevents")) { - LOG_EVENT_CREATION(TEXTEVENTS); return NS_NewDOMCompositionEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("mutationevent")) { - LOG_EVENT_CREATION(MUTATIONEVENT); return NS_NewDOMMutationEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("mutationevents")) { - LOG_EVENT_CREATION(MUTATIONEVENTS); return NS_NewDOMMutationEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("deviceorientationevent")) { - LOG_EVENT_CREATION(DEVICEORIENTATIONEVENT); DeviceOrientationEventInit init; RefPtr<Event> event = DeviceOrientationEvent::Constructor(aOwner, EmptyString(), init); @@ -922,97 +905,74 @@ EventDispatcher::CreateEvent(EventTarget* aOwner, return event.forget(); } if (aEventType.LowerCaseEqualsLiteral("devicemotionevent")) { - LOG_EVENT_CREATION(DEVICEMOTIONEVENT); return NS_NewDOMDeviceMotionEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("uievent")) { - LOG_EVENT_CREATION(UIEVENT); return NS_NewDOMUIEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("uievents")) { - LOG_EVENT_CREATION(UIEVENTS); return NS_NewDOMUIEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("event")) { - LOG_EVENT_CREATION(EVENT); return NS_NewDOMEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("events")) { - LOG_EVENT_CREATION(EVENTS); return NS_NewDOMEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("htmlevents")) { - LOG_EVENT_CREATION(HTMLEVENTS); return NS_NewDOMEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("svgevent")) { - LOG_EVENT_CREATION(SVGEVENT); return NS_NewDOMEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("svgevents")) { - LOG_EVENT_CREATION(SVGEVENTS); return NS_NewDOMEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("svgzoomevent")) { - LOG_EVENT_CREATION(SVGZOOMEVENT); return NS_NewDOMSVGZoomEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("svgzoomevents")) { - LOG_EVENT_CREATION(SVGZOOMEVENTS); return NS_NewDOMSVGZoomEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("timeevent")) { - LOG_EVENT_CREATION(TIMEEVENT); return NS_NewDOMTimeEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("timeevents")) { - LOG_EVENT_CREATION(TIMEEVENTS); return NS_NewDOMTimeEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("xulcommandevent")) { - LOG_EVENT_CREATION(XULCOMMANDEVENT); return NS_NewDOMXULCommandEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("xulcommandevents")) { - LOG_EVENT_CREATION(XULCOMMANDEVENTS); return NS_NewDOMXULCommandEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("commandevent")) { - LOG_EVENT_CREATION(COMMANDEVENT); return NS_NewDOMCommandEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("commandevents")) { - LOG_EVENT_CREATION(COMMANDEVENTS); return NS_NewDOMCommandEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("datacontainerevent")) { - LOG_EVENT_CREATION(DATACONTAINEREVENT); return NS_NewDOMDataContainerEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("datacontainerevents")) { - LOG_EVENT_CREATION(DATACONTAINEREVENTS); return NS_NewDOMDataContainerEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("messageevent")) { - LOG_EVENT_CREATION(MESSAGEEVENT); RefPtr<Event> event = new MessageEvent(aOwner, aPresContext, nullptr); return event.forget(); } if (aEventType.LowerCaseEqualsLiteral("notifypaintevent")) { - LOG_EVENT_CREATION(NOTIFYPAINTEVENT); return NS_NewDOMNotifyPaintEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("simplegestureevent")) { - LOG_EVENT_CREATION(SIMPLEGESTUREEVENT); return NS_NewDOMSimpleGestureEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("beforeunloadevent")) { - LOG_EVENT_CREATION(BEFOREUNLOADEVENT); return NS_NewDOMBeforeUnloadEvent(aOwner, aPresContext, nullptr); } // XXXkhuey this is broken if (aEventType.LowerCaseEqualsLiteral("pagetransition")) { - LOG_EVENT_CREATION(PAGETRANSITION); PageTransitionEventInit init; RefPtr<Event> event = PageTransitionEvent::Constructor(aOwner, EmptyString(), init); @@ -1020,14 +980,12 @@ EventDispatcher::CreateEvent(EventTarget* aOwner, return event.forget(); } if (aEventType.LowerCaseEqualsLiteral("scrollareaevent")) { - LOG_EVENT_CREATION(SCROLLAREAEVENT); return NS_NewDOMScrollAreaEvent(aOwner, aPresContext, nullptr); } // XXXkhuey Chrome supports popstateevent here, even though it provides no // initPopStateEvent method. This is nuts ... but copying it is unlikely to // break the web. if (aEventType.LowerCaseEqualsLiteral("popstateevent")) { - LOG_EVENT_CREATION(POPSTATEEVENT); AutoJSContext cx; RootedDictionary<PopStateEventInit> init(cx); RefPtr<Event> event = @@ -1037,11 +995,9 @@ EventDispatcher::CreateEvent(EventTarget* aOwner, } if (aEventType.LowerCaseEqualsLiteral("touchevent") && TouchEvent::PrefEnabled(nsContentUtils::GetDocShellForEventTarget(aOwner))) { - LOG_EVENT_CREATION(TOUCHEVENT); return NS_NewDOMTouchEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("hashchangeevent")) { - LOG_EVENT_CREATION(HASHCHANGEEVENT); HashChangeEventInit init; RefPtr<Event> event = HashChangeEvent::Constructor(aOwner, EmptyString(), init); @@ -1049,11 +1005,9 @@ EventDispatcher::CreateEvent(EventTarget* aOwner, return event.forget(); } if (aEventType.LowerCaseEqualsLiteral("customevent")) { - LOG_EVENT_CREATION(CUSTOMEVENT); return NS_NewDOMCustomEvent(aOwner, aPresContext, nullptr); } if (aEventType.LowerCaseEqualsLiteral("storageevent")) { - LOG_EVENT_CREATION(STORAGEEVENT); return NS_NewDOMStorageEvent(aOwner); } if (aEventType.LowerCaseEqualsLiteral("focusevent")) { @@ -1062,8 +1016,6 @@ EventDispatcher::CreateEvent(EventTarget* aOwner, return event.forget(); } -#undef LOG_EVENT_CREATION - // NEW EVENT TYPES SHOULD NOT BE ADDED HERE; THEY SHOULD USE ONLY EVENT // CONSTRUCTORS diff --git a/dom/fetch/Fetch.cpp b/dom/fetch/Fetch.cpp index 5c05f36024..e2c1394263 100644 --- a/dom/fetch/Fetch.cpp +++ b/dom/fetch/Fetch.cpp @@ -38,7 +38,6 @@ #include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/URLSearchParams.h" #include "mozilla/dom/workers/ServiceWorkerManager.h" -#include "mozilla/Telemetry.h" #include "InternalRequest.h" #include "InternalResponse.h" @@ -237,8 +236,6 @@ FetchRequest(nsIGlobalObject* aGlobal, const RequestOrUSVString& aInput, } } - Telemetry::Accumulate(Telemetry::FETCH_IS_MAINTHREAD, 1); - RefPtr<MainThreadFetchResolver> resolver = new MainThreadFetchResolver(p); RefPtr<FetchDriver> fetch = new FetchDriver(r, principal, loadGroup); fetch->SetDocument(doc); @@ -251,8 +248,6 @@ FetchRequest(nsIGlobalObject* aGlobal, const RequestOrUSVString& aInput, WorkerPrivate* worker = GetCurrentThreadWorkerPrivate(); MOZ_ASSERT(worker); - Telemetry::Accumulate(Telemetry::FETCH_IS_MAINTHREAD, 0); - if (worker->IsServiceWorker()) { r->SetSkipServiceWorker(); } diff --git a/dom/fetch/FetchDriver.cpp b/dom/fetch/FetchDriver.cpp index aac79b8290..1791399b7f 100644 --- a/dom/fetch/FetchDriver.cpp +++ b/dom/fetch/FetchDriver.cpp @@ -77,9 +77,6 @@ FetchDriver::Fetch(FetchDriverObserver* aObserver) mObserver = aObserver; - Telemetry::Accumulate(Telemetry::SERVICE_WORKER_REQUEST_PASSTHROUGH, - mRequest->WasCreatedByFetchEvent()); - // FIXME(nsm): Deal with HSTS. MOZ_RELEASE_ASSERT(!mRequest->IsSynchronous(), diff --git a/dom/geolocation/nsGeolocation.cpp b/dom/geolocation/nsGeolocation.cpp index 2d84a3e11e..201d4d89a0 100644 --- a/dom/geolocation/nsGeolocation.cpp +++ b/dom/geolocation/nsGeolocation.cpp @@ -382,13 +382,6 @@ nsGeolocationRequest::GetElement(nsIDOMElement * *aRequestingElement) NS_IMETHODIMP nsGeolocationRequest::Cancel() { - if (mRequester) { - // Record the number of denied requests for regular web content. - // This method is only called when the user explicitly denies the request, - // and is not called when the page is simply unloaded, or similar. - Telemetry::Accumulate(Telemetry::GEOLOCATION_REQUEST_GRANTED, mProtocolType); - } - if (mLocator->ClearPendingRequest(this)) { return NS_OK; } @@ -403,9 +396,6 @@ nsGeolocationRequest::Allow(JS::HandleValue aChoices) MOZ_ASSERT(aChoices.isUndefined()); if (mRequester) { - // Record the number of granted requests for regular web content. - Telemetry::Accumulate(Telemetry::GEOLOCATION_REQUEST_GRANTED, mProtocolType + 10); - // Record whether a location callback is fulfilled while the owner window // is not visible. bool isVisible = false; @@ -415,12 +405,6 @@ nsGeolocationRequest::Allow(JS::HandleValue aChoices) nsCOMPtr<nsIDocument> doc = window->GetDoc(); isVisible = doc && !doc->Hidden(); } - - if (IsWatch()) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::GEOLOCATION_WATCHPOSITION_VISIBLE, isVisible); - } else { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::GEOLOCATION_GETCURRENTPOSITION_VISIBLE, isVisible); - } } if (mLocator->ClearPendingRequest(this)) { @@ -1110,7 +1094,6 @@ Geolocation::Update(nsIDOMGeoPosition *aSomewhere) if (coords) { double accuracy = -1; coords->GetAccuracy(&accuracy); - mozilla::Telemetry::Accumulate(mozilla::Telemetry::GEOLOCATION_ACCURACY_EXPONENTIAL, accuracy); } } @@ -1135,8 +1118,6 @@ Geolocation::NotifyError(uint16_t aErrorCode) return NS_OK; } - mozilla::Telemetry::Accumulate(mozilla::Telemetry::GEOLOCATION_ERROR, true); - for (uint32_t i = mPendingCallbacks.Length(); i > 0; i--) { mPendingCallbacks[i-1]->NotifyErrorAndShutdown(aErrorCode); //NotifyErrorAndShutdown() removes the request from the array @@ -1214,10 +1195,6 @@ Geolocation::GetCurrentPosition(GeoPositionCallback callback, // After this we hand over ownership of options to our nsGeolocationRequest. - // Count the number of requests per protocol/scheme. - Telemetry::Accumulate(Telemetry::GEOLOCATION_GETCURRENTPOSITION_SECURE_ORIGIN, - static_cast<uint8_t>(mProtocolType)); - RefPtr<nsGeolocationRequest> request = new nsGeolocationRequest(this, Move(callback), Move(errorCallback), Move(options), static_cast<uint8_t>(mProtocolType), @@ -1292,10 +1269,6 @@ Geolocation::WatchPosition(GeoPositionCallback aCallback, return NS_ERROR_NOT_AVAILABLE; } - // Count the number of requests per protocol/scheme. - Telemetry::Accumulate(Telemetry::GEOLOCATION_WATCHPOSITION_SECURE_ORIGIN, - static_cast<uint8_t>(mProtocolType)); - // The watch ID: *aRv = mLastWatchId++; diff --git a/dom/html/HTMLFormElement.cpp b/dom/html/HTMLFormElement.cpp index 5164391f8d..0393ed3e00 100644 --- a/dom/html/HTMLFormElement.cpp +++ b/dom/html/HTMLFormElement.cpp @@ -38,7 +38,6 @@ // form submission #include "HTMLFormSubmissionConstants.h" #include "mozilla/dom/FormData.h" -#include "mozilla/Telemetry.h" #include "nsIFormSubmitObserver.h" #include "nsIObserverService.h" #include "nsICategoryManager.h" @@ -957,13 +956,6 @@ HTMLFormElement::DoSecureToInsecureSubmitCheck(nsIURI* aActionURL, *aCancelSubmit = (buttonPressed == 1); uint32_t telemetryBucket = nsISecurityUITelemetry::WARNING_CONFIRM_POST_TO_INSECURE_FROM_SECURE; - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SECURITY_UI, - telemetryBucket); - if (!*aCancelSubmit) { - // The user opted to continue, so note that in the next telemetry bucket. - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SECURITY_UI, - telemetryBucket + 1); - } return NS_OK; } diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp index e9086933b7..0b879bb9b4 100644 --- a/dom/html/HTMLInputElement.cpp +++ b/dom/html/HTMLInputElement.cpp @@ -24,7 +24,6 @@ #include "nsIPhonetic.h" #include "HTMLFormSubmissionConstants.h" -#include "mozilla/Telemetry.h" #include "nsIControllers.h" #include "nsIStringBundle.h" #include "nsFocusManager.h" @@ -1275,10 +1274,6 @@ HTMLInputElement::BeforeSetAttr(int32_t aNameSpaceID, nsIAtom* aName, container->RadioRequiredWillChange(name, !!aValue); } } - - if (aName == nsGkAtoms::webkitdirectory) { - Telemetry::Accumulate(Telemetry::WEBKIT_DIRECTORY_USED, true); - } } return nsGenericHTMLFormElementWithState::BeforeSetAttr(aNameSpaceID, aName, @@ -4989,10 +4984,6 @@ HTMLInputElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent, true); dispatcher->PostDOMEvent(); } - -#ifdef EARLY_BETA_OR_EARLIER - Telemetry::Accumulate(Telemetry::PWMGR_PASSWORD_INPUT_IN_FORM, !!mForm); -#endif } return rv; @@ -8863,7 +8854,6 @@ HTMLInputElement::UpdateEntries(const nsTArray<OwningFileOrDirectory>& aFilesOrD void HTMLInputElement::GetWebkitEntries(nsTArray<RefPtr<FileSystemEntry>>& aSequence) { - Telemetry::Accumulate(Telemetry::BLINK_FILESYSTEM_USED, true); aSequence.AppendElements(mEntries); } diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp index 3954e62088..6171e17663 100644 --- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -92,7 +92,6 @@ #include "mozilla/dom/VideoTrackList.h" #include "mozilla/dom/TextTrack.h" #include "nsIContentPolicy.h" -#include "mozilla/Telemetry.h" #include "DecoderDoctorDiagnostics.h" #include "DecoderTraits.h" #include "MediaContentType.h" @@ -1902,7 +1901,6 @@ void HTMLMediaElement::FastSeek(double aTime, ErrorResult& aRv) { LOG(LogLevel::Debug, ("Reporting telemetry VIDEO_FASTSEEK_USED")); - Telemetry::Accumulate(Telemetry::VIDEO_FASTSEEK_USED, 1); RefPtr<Promise> tobeDropped = Seek(aTime, SeekTarget::PrevSyncPoint, aRv); } @@ -3693,7 +3691,6 @@ HTMLMediaElement::ReportEMETelemetry() // Report telemetry for EME videos when a page is unloaded. NS_ASSERTION(NS_IsMainThread(), "Should be on main thread."); if (mIsEncrypted && Preferences::GetBool("media.eme.enabled")) { - Telemetry::Accumulate(Telemetry::VIDEO_EME_PLAY_SUCCESS, mLoadedDataFired); LOG(LogLevel::Debug, ("%p VIDEO_EME_PLAY_SUCCESS = %s", this, mLoadedDataFired ? "true" : "false")); } @@ -3745,7 +3742,6 @@ HTMLMediaElement::ReportTelemetry() } } - Telemetry::Accumulate(Telemetry::VIDEO_UNLOAD_STATE, state); LOG(LogLevel::Debug, ("%p VIDEO_UNLOAD_STATE = %d", this, state)); FrameStatisticsData data; @@ -3761,8 +3757,6 @@ HTMLMediaElement::ReportTelemetry() uint32_t percentage = 100 * data.mDroppedFrames / data.mParsedFrames; LOG(LogLevel::Debug, ("Reporting telemetry DROPPED_FRAMES_IN_VIDEO_PLAYBACK")); - Telemetry::Accumulate(Telemetry::VIDEO_DROPPED_FRAMES_PROPORTION, - percentage); } } } @@ -3774,10 +3768,8 @@ HTMLMediaElement::ReportTelemetry() double hiddenPlayTime = mHiddenPlayTime.Total(); double videoDecodeSuspendTime = mVideoDecodeSuspendTime.Total(); - Telemetry::Accumulate(Telemetry::VIDEO_PLAY_TIME_MS, SECONDS_TO_MS(playTime)); LOG(LogLevel::Debug, ("%p VIDEO_PLAY_TIME_MS = %f", this, playTime)); - Telemetry::Accumulate(Telemetry::VIDEO_HIDDEN_PLAY_TIME_MS, SECONDS_TO_MS(hiddenPlayTime)); LOG(LogLevel::Debug, ("%p VIDEO_HIDDEN_PLAY_TIME_MS = %f", this, hiddenPlayTime)); if (playTime > 0.0) { @@ -3804,24 +3796,11 @@ HTMLMediaElement::ReportTelemetry() key.AppendASCII(resolution); uint32_t hiddenPercentage = uint32_t(hiddenPlayTime / playTime * 100.0 + 0.5); - Telemetry::Accumulate(Telemetry::VIDEO_HIDDEN_PLAY_TIME_PERCENTAGE, - key, - hiddenPercentage); - // Also accumulate all percentages in an "All" key. - Telemetry::Accumulate(Telemetry::VIDEO_HIDDEN_PLAY_TIME_PERCENTAGE, - NS_LITERAL_CSTRING("All"), - hiddenPercentage); LOG(LogLevel::Debug, ("%p VIDEO_HIDDEN_PLAY_TIME_PERCENTAGE = %u, keys: '%s' and 'All'", this, hiddenPercentage, key.get())); uint32_t videoDecodeSuspendPercentage = uint32_t(videoDecodeSuspendTime / playTime * 100.0 + 0.5); - Telemetry::Accumulate(Telemetry::VIDEO_INFERRED_DECODE_SUSPEND_PERCENTAGE, - key, - videoDecodeSuspendPercentage); - Telemetry::Accumulate(Telemetry::VIDEO_INFERRED_DECODE_SUSPEND_PERCENTAGE, - NS_LITERAL_CSTRING("All"), - videoDecodeSuspendPercentage); LOG(LogLevel::Debug, ("%p VIDEO_INFERRED_DECODE_SUSPEND_PERCENTAGE = %u, keys: '%s' and 'All'", this, videoDecodeSuspendPercentage, key.get())); @@ -3832,24 +3811,12 @@ HTMLMediaElement::ReportTelemetry() / 1000.0 + 0.5, UINT32_MAX)); - Telemetry::Accumulate(Telemetry::VIDEO_INTER_KEYFRAME_AVERAGE_MS, - key, - average_ms); - Telemetry::Accumulate(Telemetry::VIDEO_INTER_KEYFRAME_AVERAGE_MS, - NS_LITERAL_CSTRING("All"), - average_ms); LOG(LogLevel::Debug, ("%p VIDEO_INTER_KEYFRAME_AVERAGE_MS = %u, keys: '%s' and 'All'", this, average_ms, key.get())); uint32_t max_ms = uint32_t(std::min<uint64_t>((data.mInterKeyFrameMax_us + 500) / 1000, UINT32_MAX)); - Telemetry::Accumulate(Telemetry::VIDEO_INTER_KEYFRAME_MAX_MS, - key, - max_ms); - Telemetry::Accumulate(Telemetry::VIDEO_INTER_KEYFRAME_MAX_MS, - NS_LITERAL_CSTRING("All"), - max_ms); LOG(LogLevel::Debug, ("%p VIDEO_INTER_KEYFRAME_MAX_MS = %u, keys: '%s' and 'All'", this, max_ms, key.get())); } else { @@ -3858,12 +3825,6 @@ HTMLMediaElement::ReportTelemetry() // decode-suspend delay (showing recovery would be difficult). uint32_t suspendDelay_ms = MediaPrefs::MDSMSuspendBackgroundVideoDelay(); if (uint32_t(playTime * 1000.0) > suspendDelay_ms) { - Telemetry::Accumulate(Telemetry::VIDEO_INTER_KEYFRAME_MAX_MS, - key, - 0); - Telemetry::Accumulate(Telemetry::VIDEO_INTER_KEYFRAME_MAX_MS, - NS_LITERAL_CSTRING("All"), - 0); LOG(LogLevel::Debug, ("%p VIDEO_INTER_KEYFRAME_MAX_MS = 0 (only 1 keyframe), keys: '%s' and 'All'", this, key.get())); } @@ -6860,97 +6821,6 @@ HTMLMediaElement::MarkAsContentSource(CallerAPI aAPI) { const bool isVisible = mVisibilityState != Visibility::APPROXIMATELY_NONVISIBLE; - if (isVisible) { - // 0 = ALL_VISIBLE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 0); - } else { - // 1 = ALL_INVISIBLE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 1); - - if (IsInUncomposedDoc()) { - // 0 = ALL_IN_TREE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 0); - } else { - // 1 = ALL_NOT_IN_TREE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 1); - } - } - - switch (aAPI) { - case CallerAPI::DRAW_IMAGE: { - if (isVisible) { - // 2 = drawImage_VISIBLE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 2); - } else { - // 3 = drawImage_INVISIBLE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 3); - - if (IsInUncomposedDoc()) { - // 2 = drawImage_IN_TREE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 2); - } else { - // 3 = drawImage_NOT_IN_TREE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 3); - } - } - break; - } - case CallerAPI::CREATE_PATTERN: { - if (isVisible) { - // 4 = createPattern_VISIBLE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 4); - } else { - // 5 = createPattern_INVISIBLE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 5); - - if (IsInUncomposedDoc()) { - // 4 = createPattern_IN_TREE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 4); - } else { - // 5 = createPattern_NOT_IN_TREE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 5); - } - } - break; - } - case CallerAPI::CREATE_IMAGEBITMAP: { - if (isVisible) { - // 6 = createImageBitmap_VISIBLE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 6); - } else { - // 7 = createImageBitmap_INVISIBLE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 7); - - if (IsInUncomposedDoc()) { - // 6 = createImageBitmap_IN_TREE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 6); - } else { - // 7 = createImageBitmap_NOT_IN_TREE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 7); - } - } - break; - } - case CallerAPI::CAPTURE_STREAM: { - if (isVisible) { - // 8 = captureStream_VISIBLE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 8); - } else { - // 9 = captureStream_INVISIBLE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE, 9); - - if (IsInUncomposedDoc()) { - // 8 = captureStream_IN_TREE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 8); - } else { - // 9 = captureStream_NOT_IN_TREE - Telemetry::Accumulate(Telemetry::VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT, 9); - } - } - break; - } - } - LOG(LogLevel::Debug, ("%p Log VIDEO_AS_CONTENT_SOURCE: visibility = %u, API: '%d' and 'All'", this, isVisible, aAPI)); diff --git a/dom/html/TextTrackManager.cpp b/dom/html/TextTrackManager.cpp index 8110dab293..4266575f70 100644 --- a/dom/html/TextTrackManager.cpp +++ b/dom/html/TextTrackManager.cpp @@ -12,7 +12,6 @@ #include "mozilla/dom/TextTrackCue.h" #include "mozilla/dom/Event.h" #include "mozilla/ClearOnShutdown.h" -#include "mozilla/Telemetry.h" #include "nsComponentManagerUtils.h" #include "nsVariant.h" #include "nsVideoFrame.h" @@ -824,24 +823,13 @@ TextTrackManager::NotifyReset() void TextTrackManager::ReportTelemetryForTrack(TextTrack* aTextTrack) const { - MOZ_ASSERT(NS_IsMainThread()); - MOZ_ASSERT(aTextTrack); - MOZ_ASSERT(mTextTracks->Length() > 0); - - TextTrackKind kind = aTextTrack->Kind(); - Telemetry::Accumulate(Telemetry::WEBVTT_TRACK_KINDS, uint32_t(kind)); +/* STUB */ } void TextTrackManager::ReportTelemetryForCue() { - MOZ_ASSERT(NS_IsMainThread()); - MOZ_ASSERT(!mNewCues->IsEmpty() || !mLastActiveCues->IsEmpty()); - - if (!mCueTelemetryReported) { - Telemetry::Accumulate(Telemetry::WEBVTT_USED_VTT_CUES, 1); - mCueTelemetryReported = true; - } +/* STUB */ } } // namespace dom diff --git a/dom/html/nsTextEditorState.cpp b/dom/html/nsTextEditorState.cpp index 187afb66df..0b4cb19206 100644 --- a/dom/html/nsTextEditorState.cpp +++ b/dom/html/nsTextEditorState.cpp @@ -47,7 +47,6 @@ #include "mozilla/dom/HTMLInputElement.h" #include "nsNumberControlFrame.h" #include "nsFrameSelection.h" -#include "mozilla/Telemetry.h" #include "mozilla/layers/ScrollInputMethods.h" using namespace mozilla; @@ -585,9 +584,6 @@ nsTextInputSelectionImpl::CompleteScroll(bool aForward) if (!mScrollFrame) return NS_ERROR_NOT_INITIALIZED; - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::MainThreadCompleteScroll); - mScrollFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1), nsIScrollableFrame::WHOLE, nsIScrollableFrame::INSTANT); @@ -640,9 +636,6 @@ nsTextInputSelectionImpl::ScrollPage(bool aForward) if (!mScrollFrame) return NS_ERROR_NOT_INITIALIZED; - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::MainThreadScrollPage); - mScrollFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1), nsIScrollableFrame::PAGES, nsIScrollableFrame::SMOOTH); @@ -655,9 +648,6 @@ nsTextInputSelectionImpl::ScrollLine(bool aForward) if (!mScrollFrame) return NS_ERROR_NOT_INITIALIZED; - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::MainThreadScrollLine); - mScrollFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1), nsIScrollableFrame::LINES, nsIScrollableFrame::SMOOTH); @@ -670,9 +660,6 @@ nsTextInputSelectionImpl::ScrollCharacter(bool aRight) if (!mScrollFrame) return NS_ERROR_NOT_INITIALIZED; - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::MainThreadScrollCharacter); - mScrollFrame->ScrollBy(nsIntPoint(aRight ? 1 : -1, 0), nsIScrollableFrame::LINES, nsIScrollableFrame::SMOOTH); diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 0a07147bf0..5c6aadb77e 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -1718,9 +1718,6 @@ ContentParent::ActorDestroy(ActorDestroyReason why) props->SetPropertyAsUint64(NS_LITERAL_STRING("childID"), mChildID); if (AbnormalShutdown == why) { - Telemetry::Accumulate(Telemetry::SUBPROCESS_ABNORMAL_ABORT, - NS_LITERAL_CSTRING("content"), 1); - props->SetPropertyAsBool(NS_LITERAL_STRING("abnormal"), true); } nsAutoString cpId; @@ -4778,7 +4775,7 @@ bool ContentParent::RecvAccumulateChildHistogram( InfallibleTArray<Accumulation>&& aAccumulations) { - Telemetry::AccumulateChild(GeckoProcessType_Content, aAccumulations); + /* STUB */ return true; } @@ -4786,6 +4783,6 @@ bool ContentParent::RecvAccumulateChildKeyedHistogram( InfallibleTArray<KeyedAccumulation>&& aAccumulations) { - Telemetry::AccumulateChildKeyed(GeckoProcessType_Content, aAccumulations); + /* STUB */ return true; } diff --git a/dom/media/AudioStream.cpp b/dom/media/AudioStream.cpp index 54cf7b9653..896dee4073 100644 --- a/dom/media/AudioStream.cpp +++ b/dom/media/AudioStream.cpp @@ -14,7 +14,6 @@ #include "mozilla/Mutex.h" #include "mozilla/Sprintf.h" #include <algorithm> -#include "mozilla/Telemetry.h" #include "CubebUtils.h" #include "nsPrintfCString.h" #include "gfxPrefs.h" @@ -378,8 +377,6 @@ AudioStream::OpenCubeb(cubeb* aContext, cubeb_stream_params& aParams, TimeDuration timeDelta = TimeStamp::Now() - aStartTime; LOG("creation time %sfirst: %u ms", aIsFirst ? "" : "not ", (uint32_t) timeDelta.ToMilliseconds()); - Telemetry::Accumulate(aIsFirst ? Telemetry::AUDIOSTREAM_FIRST_OPEN_MS : - Telemetry::AUDIOSTREAM_LATER_OPEN_MS, timeDelta.ToMilliseconds()); return NS_OK; } diff --git a/dom/media/Benchmark.cpp b/dom/media/Benchmark.cpp index fdbedeca5e..7394f8036b 100644 --- a/dom/media/Benchmark.cpp +++ b/dom/media/Benchmark.cpp @@ -11,7 +11,6 @@ #include "PDMFactory.h" #include "WebMDemuxer.h" #include "mozilla/Preferences.h" -#include "mozilla/Telemetry.h" #include "mozilla/dom/ContentChild.h" #ifndef MOZ_WIDGET_ANDROID @@ -68,7 +67,6 @@ VP9Benchmark::IsVP9DecodeFast() Preferences::SetUint(sBenchmarkFpsPref, aDecodeFps); Preferences::SetUint(sBenchmarkFpsVersionCheck, sBenchmarkVersionID); } - Telemetry::Accumulate(Telemetry::ID::VIDEO_VP9_BENCHMARK_FPS, aDecodeFps); }, []() { }); } diff --git a/dom/media/CubebUtils.cpp b/dom/media/CubebUtils.cpp index fe94264eed..93792e63bb 100644 --- a/dom/media/CubebUtils.cpp +++ b/dom/media/CubebUtils.cpp @@ -248,14 +248,9 @@ void ReportCubebBackendUsed() bool foundBackend = false; for (uint32_t i = 0; i < ArrayLength(AUDIOSTREAM_BACKEND_ID_STR); i++) { if (!strcmp(cubeb_get_backend_id(sCubebContext), AUDIOSTREAM_BACKEND_ID_STR[i])) { - Telemetry::Accumulate(Telemetry::AUDIOSTREAM_BACKEND_USED, i); foundBackend = true; } } - if (!foundBackend) { - Telemetry::Accumulate(Telemetry::AUDIOSTREAM_BACKEND_USED, - CUBEB_BACKEND_UNKNOWN); - } } void ReportCubebStreamInitFailure(bool aIsFirst) @@ -267,9 +262,6 @@ void ReportCubebStreamInitFailure(bool aIsFirst) // failures to open multiple streams in a process over time. return; } - Telemetry::Accumulate(Telemetry::AUDIOSTREAM_BACKEND_USED, - aIsFirst ? CUBEB_BACKEND_INIT_FAILURE_FIRST - : CUBEB_BACKEND_INIT_FAILURE_OTHER); } uint32_t GetCubebPlaybackLatencyInMilliseconds() diff --git a/dom/media/DecoderTraits.cpp b/dom/media/DecoderTraits.cpp index ddd35fe0dd..56ebd9ce9d 100644 --- a/dom/media/DecoderTraits.cpp +++ b/dom/media/DecoderTraits.cpp @@ -288,7 +288,7 @@ CanHandleMediaType(const MediaContentType& aType, MOZ_ASSERT(NS_IsMainThread()); if (IsHttpLiveStreamingType(aType.GetMIMEType())) { - Telemetry::Accumulate(Telemetry::MEDIA_HLS_CANPLAY_REQUESTED, true); + /* Telemetry STUB */ } if (aType.HaveCodecs()) { @@ -433,11 +433,6 @@ InstantiateDecoder(const nsACString& aType, } #endif - if (IsHttpLiveStreamingType(aType)) { - // We don't have an HLS decoder. - Telemetry::Accumulate(Telemetry::MEDIA_HLS_DECODER_SUCCESS, false); - } - return nullptr; } diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp index 9334d1bcb9..d027818dea 100644 --- a/dom/media/MediaDecoder.cpp +++ b/dom/media/MediaDecoder.cpp @@ -877,7 +877,6 @@ MediaDecoder::EnsureTelemetryReported() } for (const nsCString& codec : codecs) { DECODER_LOG("Telemetry MEDIA_CODEC_USED= '%s'", codec.get()); - Telemetry::Accumulate(Telemetry::ID::MEDIA_CODEC_USED, codec); } mTelemetryReported = true; diff --git a/dom/media/MediaDecoderStateMachine.cpp b/dom/media/MediaDecoderStateMachine.cpp index c586139ad9..5bc1d95ef4 100644 --- a/dom/media/MediaDecoderStateMachine.cpp +++ b/dom/media/MediaDecoderStateMachine.cpp @@ -1178,40 +1178,7 @@ ReportRecoveryTelemetry(const TimeStamp& aRecoveryStart, const MediaInfo& aMediaInfo, bool aIsHardwareAccelerated) { - MOZ_ASSERT(NS_IsMainThread()); - if (!aMediaInfo.HasVideo()) { - return; - } - - // Keyed by audio+video or video alone, hardware acceleration, - // and by a resolution range. - nsCString key(aMediaInfo.HasAudio() ? "AV" : "V"); - key.AppendASCII(aIsHardwareAccelerated ? "(hw)," : ","); - static const struct { int32_t mH; const char* mRes; } sResolutions[] = { - { 240, "0-240" }, - { 480, "241-480" }, - { 720, "481-720" }, - { 1080, "721-1080" }, - { 2160, "1081-2160" } - }; - const char* resolution = "2161+"; - int32_t height = aMediaInfo.mVideo.mImage.height; - for (const auto& res : sResolutions) { - if (height <= res.mH) { - resolution = res.mRes; - break; - } - } - key.AppendASCII(resolution); - - TimeDuration duration = TimeStamp::Now() - aRecoveryStart; - double duration_ms = duration.ToMilliseconds(); - Telemetry::Accumulate(Telemetry::VIDEO_SUSPEND_RECOVERY_TIME_MS, - key, - uint32_t(duration_ms + 0.5)); - Telemetry::Accumulate(Telemetry::VIDEO_SUSPEND_RECOVERY_TIME_MS, - NS_LITERAL_CSTRING("All"), - uint32_t(duration_ms + 0.5)); +/* STUB */ } void diff --git a/dom/media/MediaManager.cpp b/dom/media/MediaManager.cpp index ba6b4cd475..baaf454162 100644 --- a/dom/media/MediaManager.cpp +++ b/dom/media/MediaManager.cpp @@ -32,7 +32,6 @@ #include "nsAppDirectoryServiceDefs.h" #include "nsIInputStream.h" #include "nsILineInputStream.h" -#include "mozilla/Telemetry.h" #include "mozilla/Types.h" #include "mozilla/PeerIdentity.h" #include "mozilla/dom/ContentChild.h" @@ -2058,28 +2057,6 @@ MediaManager::GetUserMedia(nsPIDOMWindowInner* aWindow, host.LowerCaseEqualsLiteral("127.0.0.1") || host.LowerCaseEqualsLiteral("::1")); - // Record telemetry about whether the source of the call was secure, i.e., - // privileged or HTTPS. We may handle other cases -if (privileged) { - Telemetry::Accumulate(Telemetry::WEBRTC_GET_USER_MEDIA_SECURE_ORIGIN, - (uint32_t) GetUserMediaSecurityState::Privileged); - } else if (isHTTPS) { - Telemetry::Accumulate(Telemetry::WEBRTC_GET_USER_MEDIA_SECURE_ORIGIN, - (uint32_t) GetUserMediaSecurityState::HTTPS); - } else if (isFile) { - Telemetry::Accumulate(Telemetry::WEBRTC_GET_USER_MEDIA_SECURE_ORIGIN, - (uint32_t) GetUserMediaSecurityState::File); - } else if (isApp) { - Telemetry::Accumulate(Telemetry::WEBRTC_GET_USER_MEDIA_SECURE_ORIGIN, - (uint32_t) GetUserMediaSecurityState::App); - } else if (isLocalhost) { - Telemetry::Accumulate(Telemetry::WEBRTC_GET_USER_MEDIA_SECURE_ORIGIN, - (uint32_t) GetUserMediaSecurityState::Localhost); - } else { - Telemetry::Accumulate(Telemetry::WEBRTC_GET_USER_MEDIA_SECURE_ORIGIN, - (uint32_t) GetUserMediaSecurityState::Other); - } - nsCString origin; rv = nsPrincipal::GetOriginForURI(docURI, origin); if (NS_WARN_IF(NS_FAILED(rv))) { @@ -2098,8 +2075,6 @@ if (privileged) { videoType = StringToEnum(dom::MediaSourceEnumValues::strings, vc.mMediaSource, MediaSourceEnum::Other); - Telemetry::Accumulate(Telemetry::WEBRTC_GET_USER_MEDIA_TYPE, - (uint32_t) videoType); switch (videoType) { case MediaSourceEnum::Camera: break; @@ -2182,8 +2157,6 @@ if (privileged) { ac.mMediaSource.AssignASCII(EnumToASCII(dom::MediaSourceEnumValues::strings, audioType)); } - Telemetry::Accumulate(Telemetry::WEBRTC_GET_USER_MEDIA_TYPE, - (uint32_t) audioType); switch (audioType) { case MediaSourceEnum::Microphone: diff --git a/dom/media/VideoUtils.cpp b/dom/media/VideoUtils.cpp index 5c00e54bcc..b1a202c030 100644 --- a/dom/media/VideoUtils.cpp +++ b/dom/media/VideoUtils.cpp @@ -6,7 +6,6 @@ #include "mozilla/Base64.h" #include "mozilla/TaskQueue.h" -#include "mozilla/Telemetry.h" #include "mozilla/Function.h" #include "MediaContentType.h" @@ -248,24 +247,6 @@ ExtractH264CodecDetails(const nsAString& aCodec, aLevel *= 10; } - // Capture the constraint_set flag value for the purpose of Telemetry. - // We don't NS_ENSURE_SUCCESS here because ExtractH264CodecDetails doesn't - // care about this, but we make sure constraints is above 4 (constraint_set5_flag) - // otherwise collect 0 for unknown. - uint8_t constraints = PromiseFlatString(Substring(aCodec, 7, 2)).ToInteger(&rv, 16); - Telemetry::Accumulate(Telemetry::VIDEO_CANPLAYTYPE_H264_CONSTRAINT_SET_FLAG, - constraints >= 4 ? constraints : 0); - - // 244 is the highest meaningful profile value (High 4:4:4 Intra Profile) - // that can be represented as single hex byte, otherwise collect 0 for unknown. - Telemetry::Accumulate(Telemetry::VIDEO_CANPLAYTYPE_H264_PROFILE, - aProfile <= 244 ? aProfile : 0); - - // Make sure aLevel represents a value between levels 1 and 5.2, - // otherwise collect 0 for unknown. - Telemetry::Accumulate(Telemetry::VIDEO_CANPLAYTYPE_H264_LEVEL, - (aLevel >= 10 && aLevel <= 52) ? aLevel : 0); - return true; } diff --git a/dom/media/eme/DetailedPromise.cpp b/dom/media/eme/DetailedPromise.cpp index 5893bea2ee..d443e33369 100644 --- a/dom/media/eme/DetailedPromise.cpp +++ b/dom/media/eme/DetailedPromise.cpp @@ -96,9 +96,6 @@ DetailedPromise::MaybeReportTelemetry(Status aStatus) uint32_t latency = (TimeStamp::Now() - mStartTime).ToMilliseconds(); EME_LOG("%s %s latency %ums reported via telemetry", mName.get(), ((aStatus == Succeeded) ? "succcess" : "failure"), latency); - Telemetry::ID tid = (aStatus == Succeeded) ? mSuccessLatencyProbe.Value() - : mFailureLatencyProbe.Value(); - Telemetry::Accumulate(tid, latency); } } // namespace dom diff --git a/dom/media/eme/MediaKeySession.cpp b/dom/media/eme/MediaKeySession.cpp index d5eff3f773..9c002b5baa 100644 --- a/dom/media/eme/MediaKeySession.cpp +++ b/dom/media/eme/MediaKeySession.cpp @@ -315,9 +315,6 @@ MediaKeySession::GenerateRequest(const nsAString& aInitDataType, // Note: Remaining steps of generateRequest method continue in CDM. - Telemetry::Accumulate(Telemetry::VIDEO_CDM_GENERATE_REQUEST_CALLED, - ToCDMTypeTelemetryEnum(mKeySystem)); - // Convert initData to base64 for easier logging. // Note: CreateSession() Move()s the data out of the array, so we have // to copy it here. diff --git a/dom/media/eme/MediaKeys.cpp b/dom/media/eme/MediaKeys.cpp index eedd675e4f..fea548698b 100644 --- a/dom/media/eme/MediaKeys.cpp +++ b/dom/media/eme/MediaKeys.cpp @@ -13,7 +13,6 @@ #include "mozilla/dom/MediaKeySession.h" #include "mozilla/dom/DOMException.h" #include "mozilla/dom/UnionTypes.h" -#include "mozilla/Telemetry.h" #include "GMPCDMProxy.h" #ifdef MOZ_WIDGET_ANDROID #include "mozilla/MediaDrmCDMProxy.h" @@ -457,7 +456,6 @@ MediaKeys::OnCDMCreated(PromiseId aId, const nsACString& aNodeId, const uint32_t mKeySystem, MediaKeySystemStatus::Cdm_created); - Telemetry::Accumulate(Telemetry::VIDEO_CDM_CREATED, ToCDMTypeTelemetryEnum(mKeySystem)); } static bool diff --git a/dom/media/fmp4/MP4Demuxer.cpp b/dom/media/fmp4/MP4Demuxer.cpp index 646897468a..5a637b0035 100644 --- a/dom/media/fmp4/MP4Demuxer.cpp +++ b/dom/media/fmp4/MP4Demuxer.cpp @@ -81,35 +81,11 @@ private: bool AccumulateSPSTelemetry(const MediaByteBuffer* aExtradata) { + // XXX: Do we still need this without telemetry? mp4_demuxer::SPSData spsdata; if (mp4_demuxer::H264::DecodeSPSFromExtraData(aExtradata, spsdata)) { - uint8_t constraints = (spsdata.constraint_set0_flag ? (1 << 0) : 0) | - (spsdata.constraint_set1_flag ? (1 << 1) : 0) | - (spsdata.constraint_set2_flag ? (1 << 2) : 0) | - (spsdata.constraint_set3_flag ? (1 << 3) : 0) | - (spsdata.constraint_set4_flag ? (1 << 4) : 0) | - (spsdata.constraint_set5_flag ? (1 << 5) : 0); - Telemetry::Accumulate(Telemetry::VIDEO_DECODED_H264_SPS_CONSTRAINT_SET_FLAG, - constraints); - - // Collect profile_idc values up to 244, otherwise 0 for unknown. - Telemetry::Accumulate(Telemetry::VIDEO_DECODED_H264_SPS_PROFILE, - spsdata.profile_idc <= 244 ? spsdata.profile_idc : 0); - - // Make sure level_idc represents a value between levels 1 and 5.2, - // otherwise collect 0 for unknown level. - Telemetry::Accumulate(Telemetry::VIDEO_DECODED_H264_SPS_LEVEL, - (spsdata.level_idc >= 10 && spsdata.level_idc <= 52) ? - spsdata.level_idc : 0); - - // max_num_ref_frames should be between 0 and 16, anything larger will - // be treated as invalid. - Telemetry::Accumulate(Telemetry::VIDEO_H264_SPS_MAX_NUM_REF_FRAMES, - std::min(spsdata.max_num_ref_frames, 17u)); - return false; } - return true; } diff --git a/dom/media/ogg/OggDemuxer.cpp b/dom/media/ogg/OggDemuxer.cpp index 591a5248fc..0cc4846878 100644 --- a/dom/media/ogg/OggDemuxer.cpp +++ b/dom/media/ogg/OggDemuxer.cpp @@ -12,7 +12,6 @@ #include "mozilla/Atomics.h" #include "mozilla/PodOperations.h" #include "mozilla/SharedThreadPool.h" -#include "mozilla/Telemetry.h" #include "mozilla/TimeStamp.h" #include "MediaDataDemuxer.h" #include "nsAutoRef.h" @@ -164,7 +163,6 @@ OggDemuxer::~OggDemuxer() MOZ_LOG(gMediaDemuxerLog, mozilla::LogLevel::Debug, ("OggDemuxer(%p)::%s: Reporting telemetry MEDIA_OGG_LOADED_IS_CHAINED=%d", ptr, __func__, isChained)); - Telemetry::Accumulate(Telemetry::ID::MEDIA_OGG_LOADED_IS_CHAINED, isChained); }); AbstractThread::MainThread()->Dispatch(task.forget()); } diff --git a/dom/media/platforms/wmf/DXVA2Manager.cpp b/dom/media/platforms/wmf/DXVA2Manager.cpp index 0c1734c54d..1226ea6216 100644 --- a/dom/media/platforms/wmf/DXVA2Manager.cpp +++ b/dom/media/platforms/wmf/DXVA2Manager.cpp @@ -14,7 +14,6 @@ #include "mozilla/layers/D3D11ShareHandleImage.h" #include "mozilla/layers/ImageBridgeChild.h" #include "mozilla/layers/TextureForwarder.h" -#include "mozilla/Telemetry.h" #include "MediaTelemetryConstants.h" #include "mfapi.h" #include "gfxPrefs.h" @@ -442,9 +441,6 @@ D3D9DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor, } mTextureClientAllocator->SetMaxPoolSize(5); - Telemetry::Accumulate(Telemetry::MEDIA_DECODER_BACKEND_USED, - uint32_t(media::MediaDecoderBackend::WMFDXVA2D3D9)); - return S_OK; } @@ -775,9 +771,6 @@ D3D11DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor, } mTextureClientAllocator->SetMaxPoolSize(5); - Telemetry::Accumulate(Telemetry::MEDIA_DECODER_BACKEND_USED, - uint32_t(media::MediaDecoderBackend::WMFDXVA2D3D11)); - return S_OK; } diff --git a/dom/media/platforms/wmf/WMFAudioMFTManager.cpp b/dom/media/platforms/wmf/WMFAudioMFTManager.cpp index 69b62da517..3dacdf0aad 100644 --- a/dom/media/platforms/wmf/WMFAudioMFTManager.cpp +++ b/dom/media/platforms/wmf/WMFAudioMFTManager.cpp @@ -252,7 +252,6 @@ WMFAudioMFTManager::Output(int64_t aStreamOffset, LOG("Audio MFTDecoder returned success but null output."); nsCOMPtr<nsIRunnable> task = NS_NewRunnableFunction([]() -> void { LOG("Reporting telemetry AUDIO_MFT_OUTPUT_NULL_SAMPLES"); - Telemetry::Accumulate(Telemetry::ID::AUDIO_MFT_OUTPUT_NULL_SAMPLES, 1); }); AbstractThread::MainThread()->Dispatch(task.forget()); return E_FAIL; diff --git a/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp b/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp index d2c13eac75..15e2e10978 100644 --- a/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp +++ b/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp @@ -8,7 +8,6 @@ #include "VideoUtils.h" #include "WMFUtils.h" #include "nsTArray.h" -#include "mozilla/Telemetry.h" #include "mozilla/Logging.h" #include "mozilla/SyncRunnable.h" @@ -67,7 +66,7 @@ SendTelemetry(unsigned long hr) nsCOMPtr<nsIRunnable> runnable = NS_NewRunnableFunction( [sample] { - Telemetry::Accumulate(Telemetry::MEDIA_WMF_DECODE_ERROR, sample); + /* Telemetry STUB */ }); NS_DispatchToMainThread(runnable); } diff --git a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp index 291bc5b74f..8a51f817ab 100644 --- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp +++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp @@ -128,7 +128,6 @@ WMFVideoMFTManager::~WMFVideoMFTManager() nsCOMPtr<nsIRunnable> task = NS_NewRunnableFunction([=]() -> void { LOG(nsPrintfCString("Reporting telemetry VIDEO_MFT_OUTPUT_NULL_SAMPLES=%d", telemetry).get()); - Telemetry::Accumulate(Telemetry::ID::VIDEO_MFT_OUTPUT_NULL_SAMPLES, telemetry); }); AbstractThread::MainThread()->Dispatch(task.forget()); } @@ -511,8 +510,6 @@ WMFVideoMFTManager::InitInternal(bool aForceD3D9) if (mStreamType == VP9 || mStreamType == VP8) { return false; } - Telemetry::Accumulate(Telemetry::MEDIA_DECODER_BACKEND_USED, - uint32_t(media::MediaDecoderBackend::WMFSoftware)); } mDecoder = decoder; diff --git a/dom/media/systemservices/LoadManager.cpp b/dom/media/systemservices/LoadManager.cpp index f0f4f83a7a..34b8fc7e01 100644 --- a/dom/media/systemservices/LoadManager.cpp +++ b/dom/media/systemservices/LoadManager.cpp @@ -15,7 +15,6 @@ #include "nsThreadUtils.h" #include "nsReadableUtils.h" #include "nsIObserverService.h" -#include "mozilla/Telemetry.h" #include "mozilla/ArrayUtils.h" // MOZ_LOG=LoadManager:5 @@ -192,23 +191,6 @@ LoadManagerSingleton::RemoveObserver(webrtc::CPULoadStateObserver * aObserver) for (size_t i = 0; i < MOZ_ARRAY_LENGTH(mTimeInState); i++) { total += mTimeInState[i]; } - // Don't include short calls; we don't have reasonable load data, and - // such short calls rarely reach a stable state. Keep relatively - // short calls separate from longer ones - bool log = total > 5*PR_MSEC_PER_SEC; - bool small = log && total < 30*PR_MSEC_PER_SEC; - if (log) { - // Note: We don't care about rounding here; thus total may be < 100 - Telemetry::Accumulate(small ? Telemetry::WEBRTC_LOAD_STATE_RELAXED_SHORT : - Telemetry::WEBRTC_LOAD_STATE_RELAXED, - (uint32_t) (mTimeInState[webrtc::CPULoadState::kLoadRelaxed]/total * 100)); - Telemetry::Accumulate(small ? Telemetry::WEBRTC_LOAD_STATE_NORMAL_SHORT : - Telemetry::WEBRTC_LOAD_STATE_NORMAL, - (uint32_t) (mTimeInState[webrtc::CPULoadState::kLoadNormal]/total * 100)); - Telemetry::Accumulate(small ? Telemetry::WEBRTC_LOAD_STATE_STRESSED_SHORT : - Telemetry::WEBRTC_LOAD_STATE_STRESSED, - (uint32_t) (mTimeInState[webrtc::CPULoadState::kLoadStressed]/total * 100)); - } for (auto &in_state : mTimeInState) { in_state = 0; } diff --git a/dom/media/webaudio/MediaBufferDecoder.cpp b/dom/media/webaudio/MediaBufferDecoder.cpp index e9f1d5a47c..2ee11eacd4 100644 --- a/dom/media/webaudio/MediaBufferDecoder.cpp +++ b/dom/media/webaudio/MediaBufferDecoder.cpp @@ -23,7 +23,6 @@ #include "VideoUtils.h" #include "WebAudioUtils.h" #include "mozilla/dom/Promise.h" -#include "mozilla/Telemetry.h" #include "nsPrintfCString.h" #include "GMPService.h" @@ -302,7 +301,6 @@ MediaDecodeTask::OnMetadataRead(MetadataHolder* aMetadata) MOZ_LOG(gMediaDecoderLog, LogLevel::Debug, ("Telemetry (WebAudio) MEDIA_CODEC_USED= '%s'", codec.get())); - Telemetry::Accumulate(Telemetry::ID::MEDIA_CODEC_USED, codec); }); AbstractThread::MainThread()->Dispatch(task.forget()); diff --git a/dom/notification/Notification.cpp b/dom/notification/Notification.cpp index 1dd5724e45..71c4916b92 100644 --- a/dom/notification/Notification.cpp +++ b/dom/notification/Notification.cpp @@ -642,8 +642,6 @@ NotificationPermissionRequest::ResolvePromise() mCallback->Call(mPermission, error); rv = error.StealNSResult(); } - Telemetry::Accumulate( - Telemetry::WEB_NOTIFICATION_REQUEST_PERMISSION_CALLBACK, !!mCallback); mPromise->MaybeResolve(mPermission); return rv; } @@ -750,11 +748,6 @@ NotificationTelemetryService::RecordPermissions() if (!GetNotificationPermission(supportsPermission, &capability)) { continue; } - if (capability == nsIPermissionManager::DENY_ACTION) { - Telemetry::Accumulate(Telemetry::WEB_NOTIFICATION_PERMISSIONS, 0); - } else if (capability == nsIPermissionManager::ALLOW_ACTION) { - Telemetry::Accumulate(Telemetry::WEB_NOTIFICATION_PERMISSIONS, 1); - } } } @@ -800,9 +793,6 @@ NotificationTelemetryService::RecordDNDSupported() if (NS_FAILED(rv)) { return; } - - Telemetry::Accumulate( - Telemetry::ALERTS_SERVICE_DND_SUPPORTED_FLAG, true); } nsresult @@ -819,7 +809,6 @@ NotificationTelemetryService::RecordSender(nsIPrincipal* aPrincipal) } if (!mOrigins.Contains(origin)) { mOrigins.PutEntry(origin); - Telemetry::Accumulate(Telemetry::WEB_NOTIFICATION_SENDERS, 1); } return NS_OK; } @@ -829,21 +818,7 @@ NotificationTelemetryService::Observe(nsISupports* aSubject, const char* aTopic, const char16_t* aData) { - uint32_t capability; - if (strcmp("perm-changed", aTopic) || - !NS_strcmp(u"cleared", aData) || - !GetNotificationPermission(aSubject, &capability)) { - return NS_OK; - } - if (!NS_strcmp(u"deleted", aData)) { - if (capability == nsIPermissionManager::DENY_ACTION) { - Telemetry::Accumulate( - Telemetry::WEB_NOTIFICATION_PERMISSION_REMOVED, 0); - } else if (capability == nsIPermissionManager::ALLOW_ACTION) { - Telemetry::Accumulate( - Telemetry::WEB_NOTIFICATION_PERMISSION_REMOVED, 1); - } - } + /* STUB */ return NS_OK; } @@ -1407,7 +1382,6 @@ NotificationObserver::Observe(nsISupports* aSubject, const char* aTopic, AssertIsOnMainThread(); if (!strcmp("alertdisablecallback", aTopic)) { - Telemetry::Accumulate(Telemetry::WEB_NOTIFICATION_MENU, 1); if (XRE_IsParentProcess()) { return Notification::RemovePermission(mPrincipal); } @@ -1417,10 +1391,7 @@ NotificationObserver::Observe(nsISupports* aSubject, const char* aTopic, ContentChild::GetSingleton()->SendDisableNotifications( IPC::Principal(mPrincipal)); return NS_OK; - } else if (!strcmp("alertclickcallback", aTopic)) { - Telemetry::Accumulate(Telemetry::WEB_NOTIFICATION_CLICKED, 1); } else if (!strcmp("alertsettingscallback", aTopic)) { - Telemetry::Accumulate(Telemetry::WEB_NOTIFICATION_MENU, 2); if (XRE_IsParentProcess()) { return Notification::OpenSettings(mPrincipal); } @@ -1433,21 +1404,7 @@ NotificationObserver::Observe(nsISupports* aSubject, const char* aTopic, !strcmp("alertfinished", aTopic)) { RefPtr<NotificationTelemetryService> telemetry = NotificationTelemetryService::GetInstance(); - if (telemetry) { - // Record whether "do not disturb" is supported after the first - // notification, to account for falling back to XUL alerts. - telemetry->RecordDNDSupported(); - if (!mInPrivateBrowsing) { - // Ignore senders in private windows. - Unused << NS_WARN_IF(NS_FAILED(telemetry->RecordSender(mPrincipal))); - } - } Unused << NS_WARN_IF(NS_FAILED(AdjustPushQuota(aTopic))); - - if (!strcmp("alertshow", aTopic)) { - // Record notifications actually shown (e.g. don't count if DND is on). - Telemetry::Accumulate(Telemetry::WEB_NOTIFICATION_SHOWN, 1); - } } return mObserver->Observe(aSubject, aTopic, aData); diff --git a/dom/plugins/ipc/PluginHangUIParent.cpp b/dom/plugins/ipc/PluginHangUIParent.cpp index 5114f2e9a3..908182a22f 100644 --- a/dom/plugins/ipc/PluginHangUIParent.cpp +++ b/dom/plugins/ipc/PluginHangUIParent.cpp @@ -8,7 +8,6 @@ #include "PluginHangUIParent.h" -#include "mozilla/Telemetry.h" #include "mozilla/ipc/ProtocolUtils.h" #include "mozilla/plugins/PluginModuleParent.h" @@ -48,14 +47,6 @@ public: NS_IMETHOD Run() override { - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::PLUGIN_HANG_UI_USER_RESPONSE, mResponseCode); - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::PLUGIN_HANG_UI_DONT_ASK, mDontAskCode); - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::PLUGIN_HANG_UI_RESPONSE_TIME, mResponseTimeMs); - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::PLUGIN_HANG_TIME, mTimeoutMs + mResponseTimeMs); return NS_OK; } diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp index 02f0641f70..fee2d2f98b 100644 --- a/dom/plugins/ipc/PluginInstanceParent.cpp +++ b/dom/plugins/ipc/PluginInstanceParent.cpp @@ -9,7 +9,6 @@ #include "mozilla/BasicEvents.h" #include "mozilla/Preferences.h" -#include "mozilla/Telemetry.h" #include "PluginInstanceParent.h" #include "BrowserStreamParent.h" #include "PluginAsyncSurrogate.h" @@ -2504,6 +2503,5 @@ PluginInstanceParent::RecordDrawingModel() } MOZ_ASSERT(mode >= 0); - Telemetry::Accumulate(Telemetry::PLUGIN_DRAWING_MODEL, mode); mLastRecordedDrawingModel = mode; } diff --git a/dom/plugins/ipc/PluginModuleParent.cpp b/dom/plugins/ipc/PluginModuleParent.cpp index 2489baf166..f04cd209c8 100755 --- a/dom/plugins/ipc/PluginModuleParent.cpp +++ b/dom/plugins/ipc/PluginModuleParent.cpp @@ -20,7 +20,6 @@ #include "mozilla/Preferences.h" #include "mozilla/ProcessHangMonitor.h" #include "mozilla/Services.h" -#include "mozilla/Telemetry.h" #include "mozilla/Unused.h" #include "nsAutoPtr.h" #include "nsCRT.h" @@ -1172,11 +1171,6 @@ PluginModuleParent::GetRunID(uint32_t* aRunID) void PluginModuleChromeParent::ActorDestroy(ActorDestroyReason why) { - if (why == AbnormalShutdown) { - Telemetry::Accumulate(Telemetry::SUBPROCESS_ABNORMAL_ABORT, - NS_LITERAL_CSTRING("plugin"), 1); - } - // We can't broadcast settings changes anymore. UnregisterSettingsCallbacks(); @@ -2203,12 +2197,8 @@ public: void PluginModuleParent::AccumulateModuleInitBlockedTime() { - if (mPluginName.IsEmpty()) { - GetPluginDetails(); - } - Telemetry::Accumulate(Telemetry::BLOCKED_ON_PLUGIN_MODULE_INIT_MS, - GetHistogramKey(), - static_cast<uint32_t>(mTimeBlocked.ToMilliseconds())); + // XXX: mTimeBlocked can probably go if not used for anything besides + // telemetry. mTimeBlocked = TimeDuration(); } diff --git a/dom/security/nsMixedContentBlocker.cpp b/dom/security/nsMixedContentBlocker.cpp index c03628da0b..5f41f414d0 100644 --- a/dom/security/nsMixedContentBlocker.cpp +++ b/dom/security/nsMixedContentBlocker.cpp @@ -983,44 +983,5 @@ enum MixedContentHSTSState { void nsMixedContentBlocker::AccumulateMixedContentHSTS(nsIURI* aURI, bool aActive) { - // This method must only be called in the parent, because - // nsSiteSecurityService is only available in the parent - if (!XRE_IsParentProcess()) { - MOZ_ASSERT(false); - return; - } - - bool hsts; - nsresult rv; - nsCOMPtr<nsISiteSecurityService> sss = do_GetService(NS_SSSERVICE_CONTRACTID, &rv); - if (NS_FAILED(rv)) { - return; - } - rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HSTS, aURI, 0, nullptr, &hsts); - if (NS_FAILED(rv)) { - return; - } - - // states: would upgrade, hsts info cached - // active, passive - // - if (!aActive) { - if (!hsts) { - Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS, - MCB_HSTS_PASSIVE_NO_HSTS); - } - else { - Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS, - MCB_HSTS_PASSIVE_WITH_HSTS); - } - } else { - if (!hsts) { - Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS, - MCB_HSTS_ACTIVE_NO_HSTS); - } - else { - Telemetry::Accumulate(Telemetry::MIXED_CONTENT_HSTS, - MCB_HSTS_ACTIVE_WITH_HSTS); - } - } +/* STUB */ }
\ No newline at end of file diff --git a/dom/storage/DOMStorageCache.cpp b/dom/storage/DOMStorageCache.cpp index 811f79fd36..a6aa17424e 100644 --- a/dom/storage/DOMStorageCache.cpp +++ b/dom/storage/DOMStorageCache.cpp @@ -309,7 +309,7 @@ public: explicit TelemetryAutoTimer(Telemetry::ID aId) : id(aId), start(TimeStamp::Now()) {} ~TelemetryAutoTimer() - { Telemetry::AccumulateDelta_impl<Telemetry::Millisecond>::compute(id, start); } + { /* STUB */ } private: Telemetry::ID id; const TimeStamp start; @@ -329,9 +329,6 @@ DOMStorageCache::WaitForPreload(Telemetry::ID aTelemetryID) // Telemetry of rates of pending preloads if (!mPreloadTelemetryRecorded) { mPreloadTelemetryRecorded = true; - Telemetry::Accumulate( - Telemetry::LOCALDOMSTORAGE_PRELOAD_PENDING_ON_FIRST_ACCESS, - !loaded); } if (loaded) { diff --git a/dom/system/mac/CoreLocationLocationProvider.mm b/dom/system/mac/CoreLocationLocationProvider.mm index b39582a9ed..7a3feba97b 100644 --- a/dom/system/mac/CoreLocationLocationProvider.mm +++ b/dom/system/mac/CoreLocationLocationProvider.mm @@ -13,7 +13,6 @@ #include "CoreLocationLocationProvider.h" #include "nsCocoaFeatures.h" #include "prtime.h" -#include "mozilla/Telemetry.h" #include "MLSFallback.h" #include <CoreLocation/CLError.h> @@ -103,7 +102,6 @@ static const CLLocationAccuracy kDEFAULT_ACCURACY = kCLLocationAccuracyNearestTe PR_Now() / PR_USEC_PER_MSEC); mProvider->Update(geoPosition); - Telemetry::Accumulate(Telemetry::GEOLOCATION_OSX_SOURCE_IS_MLS, false); } @end @@ -127,7 +125,6 @@ CoreLocationLocationProvider::MLSUpdate::Update(nsIDOMGeoPosition *position) return NS_ERROR_FAILURE; } mParentLocationProvider.Update(position); - Telemetry::Accumulate(Telemetry::GEOLOCATION_OSX_SOURCE_IS_MLS, true); return NS_OK; } NS_IMETHODIMP diff --git a/dom/system/windows/WindowsLocationProvider.cpp b/dom/system/windows/WindowsLocationProvider.cpp index fa7f8d8be1..9da7bcc304 100644 --- a/dom/system/windows/WindowsLocationProvider.cpp +++ b/dom/system/windows/WindowsLocationProvider.cpp @@ -10,7 +10,6 @@ #include "nsComponentManagerUtils.h" #include "prtime.h" #include "MLSFallback.h" -#include "mozilla/Telemetry.h" namespace mozilla { namespace dom { @@ -34,7 +33,6 @@ WindowsLocationProvider::MLSUpdate::Update(nsIDOMGeoPosition *aPosition) if (!coords) { return NS_ERROR_FAILURE; } - Telemetry::Accumulate(Telemetry::GEOLOCATION_WIN8_SOURCE_IS_MLS, true); return mCallback->Update(aPosition); } NS_IMETHODIMP @@ -176,8 +174,6 @@ LocationEvent::OnLocationChanged(REFIID aReportType, PR_Now() / PR_USEC_PER_MSEC); mCallback->Update(position); - Telemetry::Accumulate(Telemetry::GEOLOCATION_WIN8_SOURCE_IS_MLS, false); - return S_OK; } diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp index e1910536f2..1f49e16dd3 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp @@ -30,7 +30,6 @@ #include "mozilla/AsyncEventDispatcher.h" #include "mozilla/Atomics.h" #include "mozilla/CycleCollectedJSContext.h" -#include "mozilla/Telemetry.h" #include "mozilla/TimeStamp.h" #include "mozilla/dom/asmjscache/AsmJSCache.h" #include "mozilla/dom/AtomList.h" @@ -1534,7 +1533,6 @@ RuntimeService::RegisterWorker(WorkerPrivate* aWorkerPrivate) const bool isDedicatedWorker = aWorkerPrivate->IsDedicatedWorker(); if (isServiceWorker) { AssertIsOnMainThread(); - Telemetry::Accumulate(Telemetry::SERVICE_WORKER_SPAWN_ATTEMPTS, 1); } nsCString sharedWorkerScriptSpec; @@ -1586,14 +1584,6 @@ RuntimeService::RegisterWorker(WorkerPrivate* aWorkerPrivate) // Worker spawn gets queued due to hitting max workers per domain // limit so let's log a warning. WorkerPrivate::ReportErrorToConsole("HittingMaxWorkersPerDomain2"); - - if (isServiceWorker) { - Telemetry::Accumulate(Telemetry::SERVICE_WORKER_SPAWN_GETS_QUEUED, 1); - } else if (isSharedWorker) { - Telemetry::Accumulate(Telemetry::SHARED_WORKER_SPAWN_GETS_QUEUED, 1); - } else if (isDedicatedWorker) { - Telemetry::Accumulate(Telemetry::DEDICATED_WORKER_SPAWN_GETS_QUEUED, 1); - } } else if (parent) { domainInfo->mChildWorkerCount++; @@ -1669,7 +1659,6 @@ RuntimeService::RegisterWorker(WorkerPrivate* aWorkerPrivate) if (isServiceWorker) { AssertIsOnMainThread(); - Telemetry::Accumulate(Telemetry::SERVICE_WORKER_WAS_SPAWNED, 1); } return true; } @@ -1766,8 +1755,6 @@ RuntimeService::UnregisterWorker(WorkerPrivate* aWorkerPrivate) if (aWorkerPrivate->IsServiceWorker()) { AssertIsOnMainThread(); - Telemetry::AccumulateTimeDelta(Telemetry::SERVICE_WORKER_LIFE_TIME, - aWorkerPrivate->CreationTimeStamp()); } if (aWorkerPrivate->IsSharedWorker() || diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp index a66df07314..a8f191f2e6 100644 --- a/dom/workers/ServiceWorkerManager.cpp +++ b/dom/workers/ServiceWorkerManager.cpp @@ -33,7 +33,6 @@ #include "mozilla/ClearOnShutdown.h" #include "mozilla/ErrorNames.h" #include "mozilla/LoadContext.h" -#include "mozilla/Telemetry.h" #include "mozilla/dom/BindingUtils.h" #include "mozilla/dom/ContentParent.h" #include "mozilla/dom/DOMError.h" @@ -676,7 +675,6 @@ ServiceWorkerManager::Register(mozIDOMWindow* aWindow, queue->ScheduleJob(job); AssertIsOnMainThread(); - Telemetry::Accumulate(Telemetry::SERVICE_WORKER_REGISTRATIONS, 1); promise.forget(aPromise); return NS_OK; @@ -2180,7 +2178,6 @@ ServiceWorkerManager::StartControllingADocument(ServiceWorkerRegistrationInfo* a if (!aDocumentId.IsEmpty()) { aDoc->SetId(aDocumentId); } - Telemetry::Accumulate(Telemetry::SERVICE_WORKER_CONTROLLED_DOCUMENTS, 1); } void diff --git a/dom/workers/ServiceWorkerRegistrar.cpp b/dom/workers/ServiceWorkerRegistrar.cpp index a4757ea548..7df129c2be 100644 --- a/dom/workers/ServiceWorkerRegistrar.cpp +++ b/dom/workers/ServiceWorkerRegistrar.cpp @@ -135,9 +135,6 @@ ServiceWorkerRegistrar::GetRegistrations( if (firstTime) { firstTime = false; - Telemetry::AccumulateTimeDelta( - Telemetry::SERVICE_WORKER_REGISTRATION_LOADING, - startTime); } } diff --git a/dom/workers/ServiceWorkerUpdateJob.cpp b/dom/workers/ServiceWorkerUpdateJob.cpp index 614fe4de5a..69877dfe4c 100644 --- a/dom/workers/ServiceWorkerUpdateJob.cpp +++ b/dom/workers/ServiceWorkerUpdateJob.cpp @@ -408,8 +408,6 @@ ServiceWorkerUpdateJob::ComparisonResult(nsresult aStatus, return; } - Telemetry::Accumulate(Telemetry::SERVICE_WORKER_UPDATED, 1); - // Begin step 7 of the Update algorithm to evaluate the new script. RefPtr<ServiceWorkerInfo> sw = diff --git a/dom/workers/SharedWorker.cpp b/dom/workers/SharedWorker.cpp index b0eed2def4..99bb503397 100644 --- a/dom/workers/SharedWorker.cpp +++ b/dom/workers/SharedWorker.cpp @@ -12,7 +12,6 @@ #include "mozilla/Preferences.h" #include "mozilla/dom/MessagePort.h" #include "mozilla/dom/SharedWorkerBinding.h" -#include "mozilla/Telemetry.h" #include "nsContentUtils.h" #include "nsIClassInfoImpl.h" #include "nsIDOMEvent.h" @@ -73,8 +72,6 @@ SharedWorker::Constructor(const GlobalObject& aGlobal, JSContext* aCx, return nullptr; } - Telemetry::Accumulate(Telemetry::SHARED_WORKER_COUNT, 1); - return sharedWorker.forget(); } diff --git a/dom/workers/WorkerRunnable.cpp b/dom/workers/WorkerRunnable.cpp index 6bbe40f66a..9e6d4cfb8f 100644 --- a/dom/workers/WorkerRunnable.cpp +++ b/dom/workers/WorkerRunnable.cpp @@ -15,7 +15,6 @@ #include "mozilla/DebugOnly.h" #include "mozilla/ErrorResult.h" #include "mozilla/dom/ScriptSettings.h" -#include "mozilla/Telemetry.h" #include "js/RootingAPI.h" #include "js/Value.h" @@ -572,8 +571,6 @@ WorkerMainThreadRunnable::Dispatch(Status aFailStatus, ErrorResult& aRv) { mWorkerPrivate->AssertIsOnWorkerThread(); - TimeStamp startTime = TimeStamp::NowLoRes(); - AutoSyncLoopHolder syncLoop(mWorkerPrivate, aFailStatus); mSyncLoopTarget = syncLoop.GetEventTarget(); @@ -590,11 +587,6 @@ WorkerMainThreadRunnable::Dispatch(Status aFailStatus, ErrorResult& aRv) if (!syncLoop.Run()) { aRv.ThrowUncatchableException(); } - - Telemetry::Accumulate(Telemetry::SYNC_WORKER_OPERATION, mTelemetryKey, - static_cast<uint32_t>((TimeStamp::NowLoRes() - startTime) - .ToMilliseconds())); - Unused << startTime; // Shut the compiler up. } NS_IMETHODIMP diff --git a/dom/xhr/XMLHttpRequestMainThread.cpp b/dom/xhr/XMLHttpRequestMainThread.cpp index 4fd34a9933..613008ad53 100644 --- a/dom/xhr/XMLHttpRequestMainThread.cpp +++ b/dom/xhr/XMLHttpRequestMainThread.cpp @@ -757,15 +757,6 @@ XMLHttpRequestMainThread::SetResponseType(XMLHttpRequestResponseType aResponseTy return; } - // We want to get rid of this moz-only types. Bug 1335365. - if (aResponseType == XMLHttpRequestResponseType::Moz_blob) { - Telemetry::Accumulate(Telemetry::MOZ_BLOB_IN_XHR, 1); - } else if (aResponseType == XMLHttpRequestResponseType::Moz_chunked_text) { - Telemetry::Accumulate(Telemetry::MOZ_CHUNKED_TEXT_IN_XHR, 1); - } else if (aResponseType == XMLHttpRequestResponseType::Moz_chunked_arraybuffer) { - Telemetry::Accumulate(Telemetry::MOZ_CHUNKED_ARRAYBUFFER_IN_XHR, 1); - } - // Set the responseType attribute's value to the given value. mResponseType = aResponseType; } @@ -1521,8 +1512,6 @@ XMLHttpRequestMainThread::Open(const nsACString& aMethod, GetOwner()->GetExtantDoc()->WarnOnceAbout(nsIDocument::eSyncXMLHttpRequest); } - Telemetry::Accumulate(Telemetry::XMLHTTPREQUEST_ASYNC_OR_SYNC, aAsync ? 0 : 1); - // Step 1 nsCOMPtr<nsIDocument> responsibleDocument = GetDocumentIfCurrent(); if (!responsibleDocument) { diff --git a/dom/xhr/XMLHttpRequestWorker.cpp b/dom/xhr/XMLHttpRequestWorker.cpp index c9e892f26a..2af61bd7dd 100644 --- a/dom/xhr/XMLHttpRequestWorker.cpp +++ b/dom/xhr/XMLHttpRequestWorker.cpp @@ -1588,8 +1588,6 @@ XMLHttpRequestWorker::Construct(const GlobalObject& aGlobal, WorkerPrivate* workerPrivate = GetWorkerPrivateFromContext(cx); MOZ_ASSERT(workerPrivate); - Telemetry::Accumulate(Telemetry::XHR_IN_WORKER, 1); - RefPtr<XMLHttpRequestWorker> xhr = new XMLHttpRequestWorker(workerPrivate); if (workerPrivate->XHRParamsAllowed()) { diff --git a/dom/xul/nsXULPrototypeCache.cpp b/dom/xul/nsXULPrototypeCache.cpp index 84a201d594..2c34548608 100644 --- a/dom/xul/nsXULPrototypeCache.cpp +++ b/dom/xul/nsXULPrototypeCache.cpp @@ -45,12 +45,6 @@ UpdategDisableXULCache() // Get the value of "nglayout.debug.disable_xul_cache" preference gDisableXULCache = Preferences::GetBool(kDisableXULCachePref, gDisableXULCache); - - // Sets the flag if the XUL cache is disabled - if (gDisableXULCache) { - Telemetry::Accumulate(Telemetry::XUL_CACHE_DISABLED, true); - } - } static void diff --git a/extensions/auth/nsAuthGSSAPI.cpp b/extensions/auth/nsAuthGSSAPI.cpp index f63b30eff6..0e273a3005 100644 --- a/extensions/auth/nsAuthGSSAPI.cpp +++ b/extensions/auth/nsAuthGSSAPI.cpp @@ -22,7 +22,6 @@ #include "nsIPrefBranch.h" #include "nsIServiceManager.h" #include "nsNativeCharsetUtils.h" -#include "mozilla/Telemetry.h" #include "nsAuthGSSAPI.h" @@ -377,16 +376,6 @@ nsAuthGSSAPI::Init(const char *serviceName, mServiceName = serviceName; mServiceFlags = serviceFlags; - static bool sTelemetrySent = false; - if (!sTelemetrySent) { - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::NTLM_MODULE_USED_2, - serviceFlags & nsIAuthModule::REQ_PROXY_AUTH - ? NTLM_MODULE_KERBEROS_PROXY - : NTLM_MODULE_KERBEROS_DIRECT); - sTelemetrySent = true; - } - return NS_OK; } diff --git a/extensions/auth/nsAuthSSPI.cpp b/extensions/auth/nsAuthSSPI.cpp index eb577d3bf3..677a4773af 100644 --- a/extensions/auth/nsAuthSSPI.cpp +++ b/extensions/auth/nsAuthSSPI.cpp @@ -20,7 +20,6 @@ #include "nsNetCID.h" #include "nsCOMPtr.h" #include "nsICryptoHash.h" -#include "mozilla/Telemetry.h" #include <windows.h> @@ -275,16 +274,6 @@ nsAuthSSPI::Init(const char *serviceName, if (rc != SEC_E_OK) return NS_ERROR_UNEXPECTED; - static bool sTelemetrySent = false; - if (!sTelemetrySent) { - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::NTLM_MODULE_USED_2, - serviceFlags & nsIAuthModule::REQ_PROXY_AUTH - ? NTLM_MODULE_WIN_API_PROXY - : NTLM_MODULE_WIN_API_DIRECT); - sTelemetrySent = true; - } - LOG(("AcquireCredentialsHandle() succeeded.\n")); return NS_OK; } diff --git a/extensions/auth/nsAuthSambaNTLM.cpp b/extensions/auth/nsAuthSambaNTLM.cpp index 69777dcca2..6b9204c349 100644 --- a/extensions/auth/nsAuthSambaNTLM.cpp +++ b/extensions/auth/nsAuthSambaNTLM.cpp @@ -9,7 +9,6 @@ #include "prenv.h" #include "plbase64.h" #include "prerror.h" -#include "mozilla/Telemetry.h" #include <stdlib.h> @@ -212,17 +211,6 @@ nsAuthSambaNTLM::Init(const char *serviceName, const char16_t *password) { NS_ASSERTION(!username && !domain && !password, "unexpected credentials"); - - static bool sTelemetrySent = false; - if (!sTelemetrySent) { - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::NTLM_MODULE_USED_2, - serviceFlags & nsIAuthModule::REQ_PROXY_AUTH - ? NTLM_MODULE_SAMBA_AUTH_PROXY - : NTLM_MODULE_SAMBA_AUTH_DIRECT); - sTelemetrySent = true; - } - return NS_OK; } diff --git a/extensions/cookie/nsPermissionManager.cpp b/extensions/cookie/nsPermissionManager.cpp index c448308121..1f3c257ddf 100644 --- a/extensions/cookie/nsPermissionManager.cpp +++ b/extensions/cookie/nsPermissionManager.cpp @@ -866,9 +866,6 @@ nsPermissionManager::InitDB(bool aRemoveFile) if (rv == NS_ERROR_FILE_CORRUPTED) { LogToConsole(NS_LITERAL_STRING("permissions.sqlite is corrupted! Try again!")); - // Add telemetry probe - mozilla::Telemetry::Accumulate(mozilla::Telemetry::PERMISSIONS_SQL_CORRUPTED, 1); - // delete corrupted permissions.sqlite and try again rv = permissionsFile->Remove(false); NS_ENSURE_SUCCESS(rv, rv); @@ -891,9 +888,6 @@ nsPermissionManager::InitDB(bool aRemoveFile) NS_ENSURE_SUCCESS(rv, rv); LogToConsole(NS_LITERAL_STRING("Defective permissions.sqlite has been removed.")); - // Add telemetry probe - mozilla::Telemetry::Accumulate(mozilla::Telemetry::DEFECTIVE_PERMISSIONS_SQL_REMOVED, 1); - rv = OpenDatabase(permissionsFile); NS_ENSURE_SUCCESS(rv, rv); LogToConsole(NS_LITERAL_STRING("OpenDatabase to permissions.sqlite is successful!")); @@ -1185,25 +1179,7 @@ nsPermissionManager::InitDB(bool aRemoveFile) if (NS_SUCCEEDED(rv) && NS_SUCCEEDED(countStmt->ExecuteStep(&hasResult)) && hasResult) { - int32_t permsCount = countStmt->AsInt32(0); - - // The id variable contains the number of rows inserted into the - // moz_hosts_new table (as one ID was used per entry) - uint32_t telemetryValue; - if (permsCount > id) { - telemetryValue = 3; // NEW > OLD - } else if (permsCount == id) { - telemetryValue = 2; // NEW == OLD - } else if (permsCount == 0) { - telemetryValue = 0; // NEW = 0 - } else { - telemetryValue = 1; // NEW < OLD - } - - // Report the telemetry value to telemetry - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::PERMISSIONS_REMIGRATION_COMPARISON, - telemetryValue); + // Telemetry STUB (count rows and report) } else { NS_WARNING("Could not count the rows in moz_perms"); } @@ -1221,9 +1197,6 @@ nsPermissionManager::InitDB(bool aRemoveFile) rv = mDBConn->CommitTransaction(); NS_ENSURE_SUCCESS(rv, rv); - - mozilla::Telemetry::Accumulate(mozilla::Telemetry::PERMISSIONS_MIGRATION_7_ERROR, - NS_WARN_IF(migrationError)); } else { // We don't have a moz_hosts table, so we create one for downgrading purposes. // This table is empty. diff --git a/gfx/gl/GLLibraryEGL.cpp b/gfx/gl/GLLibraryEGL.cpp index 3d8da30854..75f40f13f0 100644 --- a/gfx/gl/GLLibraryEGL.cpp +++ b/gfx/gl/GLLibraryEGL.cpp @@ -9,7 +9,6 @@ #include "gfxUtils.h" #include "mozilla/Preferences.h" #include "mozilla/Assertions.h" -#include "mozilla/Telemetry.h" #include "mozilla/Tokenizer.h" #include "mozilla/ScopeExit.h" #include "mozilla/Unused.h" @@ -472,20 +471,6 @@ GLLibraryEGL::EnsureInitialized(bool forceAccel, nsACString* const out_failureId chosenDisplay = GetAndInitDisplayForAccelANGLE(*this, out_failureId); } - // Report the acceleration status to telemetry - if (!chosenDisplay) { - if (accelAngleFailureId.IsEmpty()) { - Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_ACCL_FAILURE_ID, - NS_LITERAL_CSTRING("FEATURE_FAILURE_ACCL_ANGLE_UNKNOWN")); - } else { - Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_ACCL_FAILURE_ID, - accelAngleFailureId); - } - } else { - Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_ACCL_FAILURE_ID, - NS_LITERAL_CSTRING("SUCCESS")); - } - // Fallback to a WARP display if ANGLE fails, or if WARP is forced if (!chosenDisplay && shouldTryWARP) { chosenDisplay = GetAndInitWARPDisplay(*this, EGL_DEFAULT_DISPLAY); diff --git a/gfx/ipc/GPUChild.cpp b/gfx/ipc/GPUChild.cpp index a075716e32..bfe2d56f72 100644 --- a/gfx/ipc/GPUChild.cpp +++ b/gfx/ipc/GPUChild.cpp @@ -8,7 +8,6 @@ #include "gfxPrefs.h" #include "GPUProcessHost.h" #include "GPUProcessManager.h" -#include "mozilla/Telemetry.h" #include "mozilla/dom/CheckerboardReportService.h" #include "mozilla/gfx/gfxVars.h" #if defined(XP_WIN) @@ -80,7 +79,6 @@ GPUChild::EnsureGPUReady() SendGetDeviceStatus(&data); gfxPlatform::GetPlatform()->ImportGPUDeviceData(data); - Telemetry::AccumulateTimeDelta(Telemetry::GPU_PROCESS_LAUNCH_TIME_MS, mHost->GetLaunchTime()); mGPUReady = true; } @@ -93,7 +91,6 @@ GPUChild::RecvInitComplete(const GPUDeviceData& aData) } gfxPlatform::GetPlatform()->ImportGPUDeviceData(aData); - Telemetry::AccumulateTimeDelta(Telemetry::GPU_PROCESS_LAUNCH_TIME_MS, mHost->GetLaunchTime()); mGPUReady = true; return true; } @@ -131,14 +128,14 @@ GPUChild::RecvNotifyUiObservers(const nsCString& aTopic) bool GPUChild::RecvAccumulateChildHistogram(InfallibleTArray<Accumulation>&& aAccumulations) { - Telemetry::AccumulateChild(GeckoProcessType_GPU, aAccumulations); + /* Telemetry STUB */ return true; } bool GPUChild::RecvAccumulateChildKeyedHistogram(InfallibleTArray<KeyedAccumulation>&& aAccumulations) { - Telemetry::AccumulateChildKeyed(GeckoProcessType_GPU, aAccumulations); + /* Telemetry STUB */ return true; } @@ -152,11 +149,6 @@ GPUChild::RecvNotifyDeviceReset() void GPUChild::ActorDestroy(ActorDestroyReason aWhy) { - if (aWhy == AbnormalShutdown) { - Telemetry::Accumulate(Telemetry::SUBPROCESS_ABNORMAL_ABORT, - nsDependentCString(XRE_ChildProcessTypeToString(GeckoProcessType_GPU), 1)); - } - gfxVars::RemoveReceiver(this); mHost->OnChannelClosed(); } diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp index ff5ab9b50a..482d809a1f 100644 --- a/gfx/layers/Layers.cpp +++ b/gfx/layers/Layers.cpp @@ -22,7 +22,6 @@ #include "gfxUtils.h" // for gfxUtils, etc #include "gfx2DGlue.h" #include "mozilla/DebugOnly.h" // for DebugOnly -#include "mozilla/Telemetry.h" // for Accumulate #include "mozilla/ToString.h" #include "mozilla/dom/Animation.h" // for ComputedTimingFunction #include "mozilla/gfx/2D.h" // for DrawTarget @@ -1621,8 +1620,6 @@ void LayerManager::PostPresent() { if (!mTabSwitchStart.IsNull()) { - Telemetry::Accumulate(Telemetry::FX_TAB_SWITCH_TOTAL_MS, - uint32_t((TimeStamp::Now() - mTabSwitchStart).ToMilliseconds())); mTabSwitchStart = TimeStamp(); } } diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index 102f282f37..e7574eeb7c 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -904,9 +904,6 @@ nsEventStatus AsyncPanZoomController::HandleDragEvent(const MouseInput& aEvent, return nsEventStatus_eConsumeNoDefault; } - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::ApzScrollbarDrag); - ReentrantMonitorAutoEnter lock(mMonitor); CSSPoint scrollFramePoint = aEvent.mLocalOrigin / GetFrameMetrics().GetZoom(); // The scrollbar can be transformed with the frame but the pres shell @@ -1731,10 +1728,6 @@ nsEventStatus AsyncPanZoomController::OnScrollWheel(const ScrollWheelInput& aEve return nsEventStatus_eIgnore; } - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethodForWheelDeltaType(aEvent.mDeltaType)); - - switch (aEvent.mScrollMode) { case ScrollWheelInput::SCROLLMODE_INSTANT: { @@ -1934,9 +1927,6 @@ nsEventStatus AsyncPanZoomController::OnPan(const PanGestureInput& aEvent, bool HandlePanningUpdate(physicalPanDisplacement); - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::ApzPanGesture); - ScreenPoint panDistance(fabs(physicalPanDisplacement.x), fabs(physicalPanDisplacement.y)); MOZ_ASSERT(GetCurrentPanGestureBlock()); OverscrollHandoffState handoffState( @@ -2600,8 +2590,6 @@ void AsyncPanZoomController::TrackTouch(const MultiTouchInput& aEvent) { UpdateWithTouchAtDevicePoint(aEvent); if (prevTouchPoint != touchPoint) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::ApzTouch); MOZ_ASSERT(GetCurrentTouchBlock()); OverscrollHandoffState handoffState( *GetCurrentTouchBlock()->GetOverscrollHandoffChain(), @@ -3260,14 +3248,7 @@ AsyncPanZoomController::UpdateCheckerboardEvent(const MutexAutoLock& aProofOfLoc uint32_t aMagnitude) { if (mCheckerboardEvent && mCheckerboardEvent->RecordFrameInfo(aMagnitude)) { - // This checkerboard event is done. Report some metrics to telemetry. - mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_SEVERITY, - mCheckerboardEvent->GetSeverity()); - mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_PEAK, - mCheckerboardEvent->GetPeak()); - mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_DURATION, - (uint32_t)mCheckerboardEvent->GetDuration().ToMilliseconds()); - + // This checkerboard event is done. mPotentialCheckerboardTracker.CheckerboardDone(); if (gfxPrefs::APZRecordCheckerboarding()) { diff --git a/gfx/layers/apz/src/InputBlockState.cpp b/gfx/layers/apz/src/InputBlockState.cpp index f1310c031d..85b4e13ffe 100644 --- a/gfx/layers/apz/src/InputBlockState.cpp +++ b/gfx/layers/apz/src/InputBlockState.cpp @@ -10,7 +10,6 @@ #include "gfxPrefs.h" // for gfxPrefs #include "mozilla/MouseEvents.h" #include "mozilla/SizePrintfMacros.h" // for PRIuSIZE -#include "mozilla/Telemetry.h" // for Telemetry #include "mozilla/layers/APZCTreeManager.h" // for AllowedTouchBehavior #include "OverscrollHandoffState.h" #include "QueuedInput.h" @@ -246,8 +245,6 @@ CancelableBlockState::RecordContentResponseTime() // Not done yet, we'll get called again return; } - mozilla::Telemetry::Accumulate(mozilla::Telemetry::CONTENT_RESPONSE_DURATION, - (uint32_t)(TimeStamp::Now() - mContentResponseTimer).ToMilliseconds()); mContentResponseTimer = TimeStamp(); } diff --git a/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.cpp b/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.cpp index c83b9f45c2..e469421adf 100644 --- a/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.cpp +++ b/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.cpp @@ -33,9 +33,7 @@ PotentialCheckerboardDurationTracker::CheckerboardDone() MOZ_ASSERT(Tracking()); mInCheckerboard = false; if (!Tracking()) { - mozilla::Telemetry::AccumulateTimeDelta( - mozilla::Telemetry::CHECKERBOARD_POTENTIAL_DURATION, - mCurrentPeriodStart); + /* Telemetry STUB */ } } @@ -63,9 +61,7 @@ PotentialCheckerboardDurationTracker::InTransform(bool aInTransform) // would have taken the other !Tracking branch above. If it's false now, // it means we just stopped tracking, so we are ending a potential // checkerboard period. - mozilla::Telemetry::AccumulateTimeDelta( - mozilla::Telemetry::CHECKERBOARD_POTENTIAL_DURATION, - mCurrentPeriodStart); + /* Telemetry STUB */ } } diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp index bf510cd465..e31c6ceb65 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp @@ -484,8 +484,6 @@ CompositorVsyncScheduler::Composite(TimeStamp aVsyncTimestamp) mVsyncNotificationsSkipped = 0; TimeDuration compositeFrameTotal = TimeStamp::Now() - aVsyncTimestamp; - mozilla::Telemetry::Accumulate(mozilla::Telemetry::COMPOSITE_FRAME_ROUNDTRIP_TIME, - compositeFrameTotal.ToMilliseconds()); } else if (mVsyncNotificationsSkipped++ > gfxPrefs::CompositorUnobserveCount()) { UnobserveVsync(); } @@ -1305,7 +1303,6 @@ CompositorBridgeParent::CompositeToTarget(DrawTarget* aTarget, const gfx::IntRec } mCompositor->SetCompositionTime(TimeStamp()); - mozilla::Telemetry::AccumulateTimeDelta(mozilla::Telemetry::COMPOSITE_TIME, start); profiler_tracing("Paint", "Composite", TRACING_INTERVAL_END); } @@ -1660,19 +1657,6 @@ CompositorBridgeParent::NewCompositor(const nsTArray<LayersBackend>& aBackendHin failureReason = "SUCCESS"; } - // should only report success here - if (aBackendHints[i] == LayersBackend::LAYERS_OPENGL){ - Telemetry::Accumulate(Telemetry::OPENGL_COMPOSITING_FAILURE_ID, failureReason); - } -#ifdef XP_WIN - else if (aBackendHints[i] == LayersBackend::LAYERS_D3D9){ - Telemetry::Accumulate(Telemetry::D3D9_COMPOSITING_FAILURE_ID, failureReason); - } - else if (aBackendHints[i] == LayersBackend::LAYERS_D3D11){ - Telemetry::Accumulate(Telemetry::D3D11_COMPOSITING_FAILURE_ID, failureReason); - } -#endif - compositor->SetCompositorID(mCompositorID); return compositor; } @@ -1681,18 +1665,15 @@ CompositorBridgeParent::NewCompositor(const nsTArray<LayersBackend>& aBackendHin if (aBackendHints[i] == LayersBackend::LAYERS_OPENGL){ gfxCriticalNote << "[OPENGL] Failed to init compositor with reason: " << failureReason.get(); - Telemetry::Accumulate(Telemetry::OPENGL_COMPOSITING_FAILURE_ID, failureReason); } #ifdef XP_WIN else if (aBackendHints[i] == LayersBackend::LAYERS_D3D9){ gfxCriticalNote << "[D3D9] Failed to init compositor with reason: " << failureReason.get(); - Telemetry::Accumulate(Telemetry::D3D9_COMPOSITING_FAILURE_ID, failureReason); } else if (aBackendHints[i] == LayersBackend::LAYERS_D3D11){ gfxCriticalNote << "[D3D11] Failed to init compositor with reason: " << failureReason.get(); - Telemetry::Accumulate(Telemetry::D3D11_COMPOSITING_FAILURE_ID, failureReason); } #endif } diff --git a/gfx/src/DriverCrashGuard.cpp b/gfx/src/DriverCrashGuard.cpp index 4754c26adf..fd616575bd 100644 --- a/gfx/src/DriverCrashGuard.cpp +++ b/gfx/src/DriverCrashGuard.cpp @@ -11,7 +11,6 @@ #include "nsString.h"
#include "nsXULAppAPI.h"
#include "mozilla/Preferences.h"
-#include "mozilla/Telemetry.h"
#include "mozilla/Services.h"
#include "mozilla/gfx/Logging.h"
#include "mozilla/dom/ContentChild.h"
@@ -469,20 +468,7 @@ D3D11LayersCrashGuard::LogFeatureDisabled() void
D3D11LayersCrashGuard::RecordTelemetry(TelemetryState aState)
{
- // D3D11LayersCrashGuard is a no-op in the child process.
- if (!XRE_IsParentProcess()) {
- return;
- }
-
- // Since we instantiate this class more than once, make sure we only record
- // the first state (since that is really all we care about).
- static bool sTelemetryStateRecorded = false;
- if (sTelemetryStateRecorded) {
- return;
- }
-
- Telemetry::Accumulate(Telemetry::GRAPHICS_DRIVER_STARTUP_TEST, int32_t(aState));
- sTelemetryStateRecorded = true;
+ /* STUB */
}
D3D9VideoCrashGuard::D3D9VideoCrashGuard(dom::ContentParent* aContentParent)
diff --git a/gfx/thebes/DeviceManagerDx.cpp b/gfx/thebes/DeviceManagerDx.cpp index 2f2693c76f..e1cfc5763f 100644 --- a/gfx/thebes/DeviceManagerDx.cpp +++ b/gfx/thebes/DeviceManagerDx.cpp @@ -10,7 +10,6 @@ #include "gfxPrefs.h" #include "gfxWindowsPlatform.h" #include "mozilla/D3DMessageUtils.h" -#include "mozilla/Telemetry.h" #include "mozilla/WindowsVersion.h" #include "mozilla/gfx/GraphicsMessages.h" #include "mozilla/gfx/Logging.h" @@ -589,10 +588,6 @@ DeviceManagerDx::MaybeResetAndReacquireDevices() return false; } - if (resetReason != DeviceResetReason::FORCED_RESET) { - Telemetry::Accumulate(Telemetry::DEVICE_RESET_REASON, uint32_t(resetReason)); - } - bool createCompositorDevice = !!mCompositorDevice; bool createContentDevice = !!mContentDevice; @@ -724,7 +719,6 @@ DeviceManagerDx::GetAnyDeviceRemovedReason(DeviceResetReason* aOutReason) void DeviceManagerDx::ForceDeviceReset(ForcedDeviceResetReason aReason) { - Telemetry::Accumulate(Telemetry::FORCED_DEVICE_RESET_REASON, uint32_t(aReason)); { MutexAutoLock lock(mDeviceLock); mDeviceResetReason = Some(DeviceResetReason::FORCED_RESET); diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp index d159fddb1e..5cc1fbb92b 100644 --- a/gfx/thebes/gfxDWriteFontList.cpp +++ b/gfx/thebes/gfxDWriteFontList.cpp @@ -14,7 +14,6 @@ #include "nsCharSeparatedTokenizer.h" #include "mozilla/Preferences.h" #include "mozilla/Sprintf.h" -#include "mozilla/Telemetry.h" #include "nsDirectoryServiceUtils.h" #include "nsDirectoryServiceDefs.h" #include "nsAppDirectoryServiceDefs.h" @@ -864,8 +863,6 @@ gfxDWriteFontList::InitFontListForPlatform() hr = gfxWindowsPlatform::GetPlatform()->GetDWriteFactory()-> GetGdiInterop(getter_AddRefs(mGDIInterop)); if (FAILED(hr)) { - Telemetry::Accumulate(Telemetry::DWRITEFONT_INIT_PROBLEM, - uint32_t(errGDIInterop)); return NS_ERROR_FAILURE; } @@ -878,8 +875,6 @@ gfxDWriteFontList::InitFontListForPlatform() NS_ASSERTION(SUCCEEDED(hr), "GetSystemFontCollection failed!"); if (FAILED(hr)) { - Telemetry::Accumulate(Telemetry::DWRITEFONT_INIT_PROBLEM, - uint32_t(errSystemFontCollection)); return NS_ERROR_FAILURE; } @@ -891,8 +886,6 @@ gfxDWriteFontList::InitFontListForPlatform() NS_ASSERTION(mFontFamilies.Count() != 0, "no fonts found in the system fontlist -- holy crap batman!"); if (mFontFamilies.Count() == 0) { - Telemetry::Accumulate(Telemetry::DWRITEFONT_INIT_PROBLEM, - uint32_t(errNoFonts)); return NS_ERROR_FAILURE; } @@ -1001,9 +994,6 @@ gfxDWriteFontList::InitFontListForPlatform() } elapsedTime = (t5.QuadPart - t1.QuadPart) * 1000.0 / frequency.QuadPart; - Telemetry::Accumulate(Telemetry::DWRITEFONT_DELAYEDINITFONTLIST_TOTAL, elapsedTime); - Telemetry::Accumulate(Telemetry::DWRITEFONT_DELAYEDINITFONTLIST_COUNT, - mSystemFonts->GetFontFamilyCount()); LOG_FONTINIT(( "(fontinit) Total time in InitFontList: %9.3f ms (families: %d, %s)\n", elapsedTime, mSystemFonts->GetFontFamilyCount(), @@ -1013,7 +1003,6 @@ gfxDWriteFontList::InitFontListForPlatform() LOG_FONTINIT(("(fontinit) --- base/interop obj initialization init: %9.3f ms\n", elapsedTime)); elapsedTime = (t3.QuadPart - t2.QuadPart) * 1000.0 / frequency.QuadPart; - Telemetry::Accumulate(Telemetry::DWRITEFONT_DELAYEDINITFONTLIST_COLLECT, elapsedTime); LOG_FONTINIT(("(fontinit) --- GetSystemFontCollection: %9.3f ms\n", elapsedTime)); elapsedTime = (t4.QuadPart - t3.QuadPart) * 1000.0 / frequency.QuadPart; @@ -1455,7 +1444,6 @@ gfxDWriteFontList::PlatformGlobalFontFallback(const uint32_t aCh, *aMatchedFamily = family; return fontEntry; } - Telemetry::Accumulate(Telemetry::BAD_FALLBACK_FONT, true); } return nullptr; diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp index d0b747fff1..8ccd721f84 100644 --- a/gfx/thebes/gfxFont.cpp +++ b/gfx/thebes/gfxFont.cpp @@ -229,7 +229,6 @@ gfxFontCache::Lookup(const gfxFontEntry* aFontEntry, Key key(aFontEntry, aStyle, aUnicodeRangeMap); HashEntry *entry = mFonts.GetEntry(key); - Telemetry::Accumulate(Telemetry::FONT_CACHE_HIT, entry != nullptr); if (!entry) return nullptr; @@ -2578,9 +2577,6 @@ gfxFont::GetShapedWord(DrawTarget *aDrawTarget, if (sw) { sw->ResetAge(); - Telemetry::Accumulate((isContent ? Telemetry::WORD_CACHE_HITS_CONTENT : - Telemetry::WORD_CACHE_HITS_CHROME), - aLength); #ifndef RELEASE_OR_BETA if (aTextPerf) { aTextPerf->current.wordCacheHit++; @@ -2589,9 +2585,6 @@ gfxFont::GetShapedWord(DrawTarget *aDrawTarget, return sw; } - Telemetry::Accumulate((isContent ? Telemetry::WORD_CACHE_MISSES_CONTENT : - Telemetry::WORD_CACHE_MISSES_CHROME), - aLength); #ifndef RELEASE_OR_BETA if (aTextPerf) { aTextPerf->current.wordCacheMiss++; diff --git a/gfx/thebes/gfxGradientCache.cpp b/gfx/thebes/gfxGradientCache.cpp index fa25bd78c8..bfa82685c3 100644 --- a/gfx/thebes/gfxGradientCache.cpp +++ b/gfx/thebes/gfxGradientCache.cpp @@ -8,7 +8,6 @@ #include "PLDHashTable.h" #include "nsExpirationTracker.h" #include "nsClassHashtable.h" -#include "mozilla/Telemetry.h" #include "gfxGradientCache.h" #include <time.h> @@ -127,7 +126,6 @@ class GradientCache final : public nsExpirationTracker<GradientCacheData,4> { srand(time(nullptr)); mTimerPeriod = rand() % MAX_GENERATION_MS + 1; - Telemetry::Accumulate(Telemetry::GRADIENT_RETENTION_TIME, mTimerPeriod); } virtual void NotifyExpired(GradientCacheData* aObject) diff --git a/gfx/thebes/gfxMacPlatformFontList.mm b/gfx/thebes/gfxMacPlatformFontList.mm index bf958a90bb..3d2fcc6a9e 100644 --- a/gfx/thebes/gfxMacPlatformFontList.mm +++ b/gfx/thebes/gfxMacPlatformFontList.mm @@ -65,7 +65,6 @@ #include "mozilla/MemoryReporting.h" #include "mozilla/Preferences.h" #include "mozilla/Sprintf.h" -#include "mozilla/Telemetry.h" #include "mozilla/gfx/2D.h" #include <unistd.h> @@ -1043,10 +1042,6 @@ gfxMacPlatformFontList::PlatformGlobalFontFallback(const uint32_t aCh, } } - if (cantUseFallbackFont) { - Telemetry::Accumulate(Telemetry::BAD_FALLBACK_FONT, cantUseFallbackFont); - } - ::CFRelease(str); return fontEntry; diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 171d1bec91..d5af16a196 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -361,7 +361,6 @@ class CrashTelemetryEvent : public Runnable NS_IMETHOD Run() override { MOZ_ASSERT(NS_IsMainThread()); - Telemetry::Accumulate(Telemetry::GFX_CRASH, mReason); return NS_OK; } @@ -374,29 +373,7 @@ NS_IMPL_ISUPPORTS_INHERITED0(CrashTelemetryEvent, Runnable); void CrashStatsLogForwarder::CrashAction(LogReason aReason) { -#ifndef RELEASE_OR_BETA - // Non-release builds crash by default, but will use telemetry - // if this environment variable is present. - static bool useTelemetry = gfxEnv::GfxDevCrashTelemetry(); -#else - // Release builds use telemetry by default, but will crash instead - // if this environment variable is present. - static bool useTelemetry = !gfxEnv::GfxDevCrashMozCrash(); -#endif - - if (useTelemetry) { - // The callers need to assure that aReason is in the range - // that the telemetry call below supports. - if (NS_IsMainThread()) { - Telemetry::Accumulate(Telemetry::GFX_CRASH, (uint32_t)aReason); - } else { - nsCOMPtr<nsIRunnable> r1 = new CrashTelemetryEvent((uint32_t)aReason); - NS_DispatchToMainThread(r1); - } - } else { - // ignoring aReason, we can get the information we need from the stack - MOZ_CRASH("GFX_CRASH"); - } + MOZ_CRASH("GFX_CRASH"); } NS_IMPL_ISUPPORTS(SRGBOverrideObserver, nsIObserver, nsISupportsWeakReference) diff --git a/gfx/thebes/gfxPlatformFontList.cpp b/gfx/thebes/gfxPlatformFontList.cpp index e12f4e1975..59df406663 100644 --- a/gfx/thebes/gfxPlatformFontList.cpp +++ b/gfx/thebes/gfxPlatformFontList.cpp @@ -322,8 +322,6 @@ gfxPlatformFontList::InitOtherFamilyNames() mOtherFamilyNamesInitialized = true; } TimeStamp end = TimeStamp::Now(); - Telemetry::AccumulateTimeDelta(Telemetry::FONTLIST_INITOTHERFAMILYNAMES, - start, end); if (LOG_FONTINIT_ENABLED()) { TimeDuration elapsed = end - start; @@ -370,8 +368,6 @@ gfxPlatformFontList::SearchFamiliesForFaceName(const nsAString& aFaceName) lookup = FindFaceName(aFaceName); TimeStamp end = TimeStamp::Now(); - Telemetry::AccumulateTimeDelta(Telemetry::FONTLIST_INITFACENAMELISTS, - start, end); if (LOG_FONTINIT_ENABLED()) { TimeDuration elapsed = end - start; LOG_FONTINIT(("(fontinit) SearchFamiliesForFaceName took %8.2f ms %s %s", @@ -587,16 +583,8 @@ gfxPlatformFontList::SystemFindFontForChar(uint32_t aCh, uint32_t aNextCh, static bool first = true; int32_t intElapsed = int32_t(first ? elapsed.ToMilliseconds() : elapsed.ToMicroseconds()); - Telemetry::Accumulate((first ? Telemetry::SYSTEM_FONT_FALLBACK_FIRST : - Telemetry::SYSTEM_FONT_FALLBACK), - intElapsed); first = false; - // track the script for which fallback occurred (incremented one make it - // 1-based) - Telemetry::Accumulate(Telemetry::SYSTEM_FONT_FALLBACK_SCRIPT, - int(aRunScript) + 1); - return fontEntry; } diff --git a/gfx/thebes/gfxUserFontSet.cpp b/gfx/thebes/gfxUserFontSet.cpp index 23c26d9fed..72c54d9b5d 100644 --- a/gfx/thebes/gfxUserFontSet.cpp +++ b/gfx/thebes/gfxUserFontSet.cpp @@ -453,8 +453,6 @@ gfxUserFontEntry::LoadNextSrc() gfxUserFontData::kUnknownCompression); mPlatformFontEntry = fe; SetLoadState(STATUS_LOADED); - Telemetry::Accumulate(Telemetry::WEBFONT_SRCTYPE, - currSrc.mSourceType + 1); return; } else { LOG(("userfonts (%p) [src %d] failed local: (%s) for (%s)\n", @@ -517,8 +515,6 @@ gfxUserFontEntry::LoadNextSrc() if (NS_SUCCEEDED(rv) && LoadPlatformFont(buffer, bufferLength)) { SetLoadState(STATUS_LOADED); - Telemetry::Accumulate(Telemetry::WEBFONT_SRCTYPE, - currSrc.mSourceType + 1); return; } else { mFontSet->LogMessage(this, @@ -572,8 +568,6 @@ gfxUserFontEntry::LoadNextSrc() // LoadPlatformFont takes ownership of the buffer, so no need // to free it here. SetLoadState(STATUS_LOADED); - Telemetry::Accumulate(Telemetry::WEBFONT_SRCTYPE, - currSrc.mSourceType + 1); return; } else { mFontSet->LogMessage(this, @@ -617,7 +611,6 @@ gfxUserFontEntry::LoadPlatformFont(const uint8_t* aFontData, uint32_t& aLength) gfxUserFontType fontType = gfxFontUtils::DetermineFontDataType(aFontData, aLength); - Telemetry::Accumulate(Telemetry::WEBFONT_FONTTYPE, uint32_t(fontType)); // Unwrap/decompress/sanitize or otherwise munge the downloaded data // to make a usable sfnt structure. @@ -650,13 +643,6 @@ gfxUserFontEntry::LoadPlatformFont(const uint8_t* aFontData, uint32_t& aLength) if (saneData) { if (saneLen) { fontCompressionRatio = uint32_t(100.0 * aLength / saneLen + 0.5); - if (fontType == GFX_USERFONT_WOFF || - fontType == GFX_USERFONT_WOFF2) { - Telemetry::Accumulate(fontType == GFX_USERFONT_WOFF ? - Telemetry::WEBFONT_COMPRESSION_WOFF : - Telemetry::WEBFONT_COMPRESSION_WOFF2, - fontCompressionRatio); - } } // The sanitizer ensures that we have a valid sfnt and a usable diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index a988859eb9..b1ede7ad27 100755 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -430,10 +430,6 @@ gfxWindowsPlatform::HandleDeviceReset() return false; } - if (resetReason != DeviceResetReason::FORCED_RESET) { - Telemetry::Accumulate(Telemetry::DEVICE_RESET_REASON, uint32_t(resetReason)); - } - // Remove devices and adapters. DeviceManagerDx::Get()->ResetDevices(); @@ -1442,15 +1438,7 @@ gfxWindowsPlatform::InitializeD3D11Config() /* static */ void gfxWindowsPlatform::RecordContentDeviceFailure(TelemetryDeviceCode aDevice) { - // If the parent process fails to acquire a device, we record this - // normally as part of the environment. The exceptional case we're - // looking for here is when the parent process successfully acquires - // a device, but the content process fails to acquire the same device. - // This would not normally be displayed in about:support. - if (!XRE_IsContentProcess()) { - return; - } - Telemetry::Accumulate(Telemetry::GFX_CONTENT_FAILED_TO_ACQUIRE_DEVICE, uint32_t(aDevice)); + /* STUB */ } void diff --git a/image/RasterImage.cpp b/image/RasterImage.cpp index aad705473d..b67ec3bef4 100644 --- a/image/RasterImage.cpp +++ b/image/RasterImage.cpp @@ -39,8 +39,8 @@ #include "mozilla/MemoryReporting.h" #include "mozilla/Services.h" #include <stdint.h> -#include "mozilla/Telemetry.h" #include "mozilla/TimeStamp.h" +#include "mozilla/Telemetry.h" #include "mozilla/Tuple.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/gfx/Scale.h" @@ -104,9 +104,6 @@ RasterImage::~RasterImage() // Release all frames from the surface cache. SurfaceCache::RemoveImage(ImageKey(this)); - - // Record Telemetry. - Telemetry::Accumulate(Telemetry::IMAGE_DECODE_COUNT, mDecodeCount); } nsresult @@ -1365,19 +1362,9 @@ RasterImage::Draw(gfxContext* aContext, return DrawResult::NOT_READY; } - bool shouldRecordTelemetry = !mDrawStartTime.IsNull() && - surface->IsFinished(); - auto result = DrawInternal(Move(surface), aContext, aSize, aRegion, aSamplingFilter, flags); - if (shouldRecordTelemetry) { - TimeDuration drawLatency = TimeStamp::Now() - mDrawStartTime; - Telemetry::Accumulate(Telemetry::IMAGE_DECODE_ON_DRAW_LATENCY, - int32_t(drawLatency.ToMicroseconds())); - mDrawStartTime = TimeStamp(); - } - return result; } @@ -1614,22 +1601,6 @@ RasterImage::NotifyDecodeComplete(const DecoderFinalStatus& aStatus, mAnimationState->SetDoneDecoding(true); } - // Do some telemetry if this isn't a metadata decode. - if (!aStatus.mWasMetadataDecode) { - if (aTelemetry.mChunkCount) { - Telemetry::Accumulate(Telemetry::IMAGE_DECODE_CHUNKS, aTelemetry.mChunkCount); - } - - if (aStatus.mFinished) { - Telemetry::Accumulate(Telemetry::IMAGE_DECODE_TIME, - int32_t(aTelemetry.mDecodeTime.ToMicroseconds())); - - if (aTelemetry.mSpeedHistogram) { - Telemetry::Accumulate(*aTelemetry.mSpeedHistogram, aTelemetry.Speed()); - } - } - } - // Only act on errors if we have no usable frames from the decoder. if (aStatus.mHadError && (!mAnimationState || mAnimationState->KnownFrameCount() == 0)) { diff --git a/image/imgFrame.cpp b/image/imgFrame.cpp index 9c5bf9b998..5da2ccec5d 100644 --- a/image/imgFrame.cpp +++ b/image/imgFrame.cpp @@ -22,7 +22,6 @@ #include "mozilla/gfx/Tools.h" #include "mozilla/Likely.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Telemetry.h" #include "nsMargin.h" #include "nsThreadUtils.h" @@ -620,8 +619,6 @@ imgFrame::Finish(Opacity aFrameOpacity /* = Opacity::SOME_TRANSPARENCY */, if (aFrameOpacity == Opacity::FULLY_OPAQUE) { mHasNoAlpha = true; - Telemetry::Accumulate(Telemetry::IMAGE_DECODE_OPAQUE_BGRA, - mFormat == SurfaceFormat::B8G8R8A8); } mDisposalMethod = aDisposalMethod; diff --git a/intl/uconv/ucvja/nsJapaneseToUnicode.h b/intl/uconv/ucvja/nsJapaneseToUnicode.h index 8e3f207eb2..e2ea45fb68 100644 --- a/intl/uconv/ucvja/nsJapaneseToUnicode.h +++ b/intl/uconv/ucvja/nsJapaneseToUnicode.h @@ -83,8 +83,6 @@ public: mGB2312Decoder = nullptr; mEUCKRDecoder = nullptr; mISO88597Decoder = nullptr; - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::DECODER_INSTANTIATED_ISO2022JP, true); } virtual ~nsISO2022JPToUnicodeV2() { diff --git a/intl/uconv/ucvlatin/nsCP866ToUnicode.cpp b/intl/uconv/ucvlatin/nsCP866ToUnicode.cpp index 4d4b899480..08db5f65a6 100644 --- a/intl/uconv/ucvlatin/nsCP866ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsCP866ToUnicode.cpp @@ -20,7 +20,6 @@ nsCP866ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "cp866.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_IBM866, true); return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsISO88595ToUnicode.cpp b/intl/uconv/ucvlatin/nsISO88595ToUnicode.cpp index 23395aa4e5..dae79881d4 100644 --- a/intl/uconv/ucvlatin/nsISO88595ToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsISO88595ToUnicode.cpp @@ -20,7 +20,6 @@ nsISO88595ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "8859-5.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_ISO_8859_5, true); return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsKOI8RToUnicode.cpp b/intl/uconv/ucvlatin/nsKOI8RToUnicode.cpp index 35f77ba410..25a760a66d 100644 --- a/intl/uconv/ucvlatin/nsKOI8RToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsKOI8RToUnicode.cpp @@ -5,7 +5,6 @@ #include "nsUCConstructors.h" #include "nsKOI8RToUnicode.h" -#include "mozilla/Telemetry.h" using namespace mozilla; @@ -20,7 +19,6 @@ nsKOI8RToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "koi8r.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_KOI8R, true); return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsKOI8UToUnicode.cpp b/intl/uconv/ucvlatin/nsKOI8UToUnicode.cpp index c5d588ad6a..2dbb863777 100644 --- a/intl/uconv/ucvlatin/nsKOI8UToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsKOI8UToUnicode.cpp @@ -20,7 +20,6 @@ nsKOI8UToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "koi8u.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_KOI8U, true); return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacArabicToUnicode.cpp b/intl/uconv/ucvlatin/nsMacArabicToUnicode.cpp index 1a9950df72..7ff51f868c 100644 --- a/intl/uconv/ucvlatin/nsMacArabicToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacArabicToUnicode.cpp @@ -5,7 +5,6 @@ #include "nsUCConstructors.h" #include "nsMacArabicToUnicode.h" -#include "mozilla/Telemetry.h" using namespace mozilla; @@ -20,7 +19,6 @@ nsMacArabicToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "macarabic.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_MACARABIC, true); return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacCEToUnicode.cpp b/intl/uconv/ucvlatin/nsMacCEToUnicode.cpp index 458d0f53ce..4dd3eb159a 100644 --- a/intl/uconv/ucvlatin/nsMacCEToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacCEToUnicode.cpp @@ -20,7 +20,6 @@ nsMacCEToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "macce.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_MACCE, true); return CreateOneByteDecoder((uMappingTable*) &g_MacCEMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacCroatianToUnicode.cpp b/intl/uconv/ucvlatin/nsMacCroatianToUnicode.cpp index 9799ac9ad5..a0549ee269 100644 --- a/intl/uconv/ucvlatin/nsMacCroatianToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacCroatianToUnicode.cpp @@ -5,7 +5,6 @@ #include "nsUCConstructors.h" #include "nsMacCroatianToUnicode.h" -#include "mozilla/Telemetry.h" using namespace mozilla; @@ -20,7 +19,6 @@ nsMacCroatianToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "maccroat.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_MACCROATIAN, true); return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacCyrillicToUnicode.cpp b/intl/uconv/ucvlatin/nsMacCyrillicToUnicode.cpp index edbf604fd5..0475c2a135 100644 --- a/intl/uconv/ucvlatin/nsMacCyrillicToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacCyrillicToUnicode.cpp @@ -5,7 +5,6 @@ #include "nsUCConstructors.h" #include "nsMacCyrillicToUnicode.h" -#include "mozilla/Telemetry.h" using namespace mozilla; @@ -20,7 +19,6 @@ nsMacCyrillicToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "maccyril.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_MACCYRILLIC, true); return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacDevanagariToUnicode.cpp b/intl/uconv/ucvlatin/nsMacDevanagariToUnicode.cpp index 3c1cae7338..630553d9c1 100644 --- a/intl/uconv/ucvlatin/nsMacDevanagariToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacDevanagariToUnicode.cpp @@ -5,7 +5,6 @@ #include "nsUCConstructors.h" #include "nsMacDevanagariToUnicode.h" -#include "mozilla/Telemetry.h" using namespace mozilla; @@ -20,7 +19,6 @@ nsMacDevanagariToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "macdevanaga.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_MACDEVANAGARI, true); return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacFarsiToUnicode.cpp b/intl/uconv/ucvlatin/nsMacFarsiToUnicode.cpp index 1e7e291bad..5870533ff5 100644 --- a/intl/uconv/ucvlatin/nsMacFarsiToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacFarsiToUnicode.cpp @@ -5,7 +5,6 @@ #include "nsUCConstructors.h" #include "nsMacFarsiToUnicode.h" -#include "mozilla/Telemetry.h" using namespace mozilla; @@ -20,7 +19,6 @@ nsMacFarsiToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "macfarsi.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_MACFARSI, true); return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacGreekToUnicode.cpp b/intl/uconv/ucvlatin/nsMacGreekToUnicode.cpp index 3f90811d37..64d489147a 100644 --- a/intl/uconv/ucvlatin/nsMacGreekToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacGreekToUnicode.cpp @@ -5,7 +5,6 @@ #include "nsUCConstructors.h" #include "nsMacGreekToUnicode.h" -#include "mozilla/Telemetry.h" using namespace mozilla; @@ -20,7 +19,6 @@ nsMacGreekToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "macgreek.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_MACGREEK, true); return CreateOneByteDecoder((uMappingTable*) &g_MacGreekMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacGujaratiToUnicode.cpp b/intl/uconv/ucvlatin/nsMacGujaratiToUnicode.cpp index 21b3020f55..0d01e33e4d 100644 --- a/intl/uconv/ucvlatin/nsMacGujaratiToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacGujaratiToUnicode.cpp @@ -17,7 +17,6 @@ nsMacGujaratiToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "macgujarati.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_MACGUJARATI, true); return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacGurmukhiToUnicode.cpp b/intl/uconv/ucvlatin/nsMacGurmukhiToUnicode.cpp index d6b3a88d66..e0a59c2053 100644 --- a/intl/uconv/ucvlatin/nsMacGurmukhiToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacGurmukhiToUnicode.cpp @@ -5,7 +5,6 @@ #include "nsUCConstructors.h" #include "nsMacGurmukhiToUnicode.h" -#include "mozilla/Telemetry.h" using namespace mozilla; @@ -20,7 +19,6 @@ nsMacGurmukhiToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "macgurmukhi.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_MACGURMUKHI, true); return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacHebrewToUnicode.cpp b/intl/uconv/ucvlatin/nsMacHebrewToUnicode.cpp index f19d82c090..d7b1f2139a 100644 --- a/intl/uconv/ucvlatin/nsMacHebrewToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacHebrewToUnicode.cpp @@ -5,7 +5,6 @@ #include "nsUCConstructors.h" #include "nsMacHebrewToUnicode.h" -#include "mozilla/Telemetry.h" using namespace mozilla; @@ -20,7 +19,6 @@ nsMacHebrewToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "machebrew.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_MACHEBREW, true); return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacIcelandicToUnicode.cpp b/intl/uconv/ucvlatin/nsMacIcelandicToUnicode.cpp index 00cff75091..2b2a3b4d00 100644 --- a/intl/uconv/ucvlatin/nsMacIcelandicToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacIcelandicToUnicode.cpp @@ -5,7 +5,6 @@ #include "nsUCConstructors.h" #include "nsMacIcelandicToUnicode.h" -#include "mozilla/Telemetry.h" using namespace mozilla; @@ -20,7 +19,6 @@ nsMacIcelandicToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "macicela.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_MACICELANDIC, true); return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacRomanianToUnicode.cpp b/intl/uconv/ucvlatin/nsMacRomanianToUnicode.cpp index 96c24dea39..955610e165 100644 --- a/intl/uconv/ucvlatin/nsMacRomanianToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacRomanianToUnicode.cpp @@ -5,7 +5,6 @@ #include "nsUCConstructors.h" #include "nsMacRomanianToUnicode.h" -#include "mozilla/Telemetry.h" using namespace mozilla; @@ -20,7 +19,6 @@ nsMacRomanianToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "macro.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_MACROMANIAN, true); return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable, aOuter, aIID, aResult); } diff --git a/intl/uconv/ucvlatin/nsMacTurkishToUnicode.cpp b/intl/uconv/ucvlatin/nsMacTurkishToUnicode.cpp index 86d2d1ae71..c30cf94d40 100644 --- a/intl/uconv/ucvlatin/nsMacTurkishToUnicode.cpp +++ b/intl/uconv/ucvlatin/nsMacTurkishToUnicode.cpp @@ -5,7 +5,6 @@ #include "nsUCConstructors.h" #include "nsMacTurkishToUnicode.h" -#include "mozilla/Telemetry.h" using namespace mozilla; @@ -20,7 +19,6 @@ nsMacTurkishToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID, #include "macturki.ut" }; - Telemetry::Accumulate(Telemetry::DECODER_INSTANTIATED_MACTURKISH, true); return CreateOneByteDecoder((uMappingTable*) &g_MacTurkishMappingTable, aOuter, aIID, aResult); } diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp index e58408e0c6..8147e87dc2 100644 --- a/ipc/glue/GeckoChildProcessHost.cpp +++ b/ipc/glue/GeckoChildProcessHost.cpp @@ -32,7 +32,6 @@ #include "mozilla/ClearOnShutdown.h" #include "mozilla/ipc/BrowserProcessSubThread.h" #include "mozilla/Omnijar.h" -#include "mozilla/Telemetry.h" #include "ProtocolUtils.h" #include <sys/stat.h> @@ -534,8 +533,6 @@ GeckoChildProcessHost::RunPerformAsyncLaunch(std::vector<std::string> aExtraOpts lock.Notify(); CHROMIUM_LOG(ERROR) << "Failed to launch " << XRE_ChildProcessTypeToString(mProcessType) << " subprocess"; - Telemetry::Accumulate(Telemetry::SUBPROCESS_LAUNCH_FAILURE, - nsDependentCString(XRE_ChildProcessTypeToString(mProcessType))); } return ok; } diff --git a/ipc/glue/MessageChannel.cpp b/ipc/glue/MessageChannel.cpp index 7861f3e2d3..a988fae53c 100644 --- a/ipc/glue/MessageChannel.cpp +++ b/ipc/glue/MessageChannel.cpp @@ -760,11 +760,6 @@ MessageChannel::Echo(Message* aMsg) bool MessageChannel::Send(Message* aMsg) { - if (aMsg->size() >= kMinTelemetryMessageSize) { - Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE, - nsDependentCString(aMsg->name()), aMsg->size()); - } - MOZ_RELEASE_ASSERT(!aMsg->is_sync()); MOZ_RELEASE_ASSERT(aMsg->nested_level() != IPC::Message::NESTED_INSIDE_SYNC); @@ -1059,11 +1054,6 @@ MessageChannel::ProcessPendingRequests(AutoEnterTransaction& aTransaction) bool MessageChannel::Send(Message* aMsg, Message* aReply) { - if (aMsg->size() >= kMinTelemetryMessageSize) { - Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE, - nsDependentCString(aMsg->name()), aMsg->size()); - } - nsAutoPtr<Message> msg(aMsg); // Sanity checks. @@ -1249,10 +1239,6 @@ MessageChannel::Send(Message* aMsg, Message* aReply) MOZ_RELEASE_ASSERT(reply->is_sync()); *aReply = Move(*reply); - if (aReply->size() >= kMinTelemetryMessageSize) { - Telemetry::Accumulate(Telemetry::IPC_REPLY_SIZE, - nsDependentCString(msgName), aReply->size()); - } return true; } @@ -2546,7 +2532,6 @@ void CancelCPOWs() { if (gParentProcessBlocker) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::IPC_TRANSACTION_CANCEL, true); gParentProcessBlocker->CancelCurrentTransaction(); } } diff --git a/js/ipc/JavaScriptParent.cpp b/js/ipc/JavaScriptParent.cpp index ca0a0bd214..6cf9e05911 100644 --- a/js/ipc/JavaScriptParent.cpp +++ b/js/ipc/JavaScriptParent.cpp @@ -15,7 +15,6 @@ #include "js/HeapAPI.h" #include "xpcprivate.h" #include "mozilla/Casting.h" -#include "mozilla/Telemetry.h" #include "mozilla/Unused.h" #include "nsAutoPtr.h" @@ -110,7 +109,6 @@ JavaScriptParent::allowMessage(JSContext* cx) if (!xpc::CompartmentPrivate::Get(jsGlobal)->allowCPOWs) { if (!addonId && ForbidUnsafeBrowserCPOWs() && !isSafe) { - Telemetry::Accumulate(Telemetry::BROWSER_SHIM_USAGE_BLOCKED, 1); JS_ReportErrorASCII(cx, "unsafe CPOW usage forbidden"); return false; } @@ -120,7 +118,6 @@ JavaScriptParent::allowMessage(JSContext* cx) nsString addonIdString; AssignJSFlatString(addonIdString, flat); NS_ConvertUTF16toUTF8 addonIdCString(addonIdString); - Telemetry::Accumulate(Telemetry::ADDON_FORBIDDEN_CPOW_USAGE, addonIdCString); if (ForbidCPOWsInCompatibleAddon(addonIdCString)) { JS_ReportErrorASCII(cx, "CPOW usage forbidden in this add-on"); diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp index f352607d4c..82af645209 100644 --- a/js/xpconnect/src/XPCJSContext.cpp +++ b/js/xpconnect/src/XPCJSContext.cpp @@ -28,7 +28,6 @@ #include "nsPIDOMWindow.h" #include "nsPrintfCString.h" #include "mozilla/Preferences.h" -#include "mozilla/Telemetry.h" #include "mozilla/Services.h" #include "mozilla/dom/ScriptSettings.h" @@ -135,8 +134,6 @@ public: { TimeStamp start = TimeStamp::Now(); bool hadSnowWhiteObjects = nsCycleCollector_doDeferredDeletion(); - Telemetry::Accumulate(Telemetry::CYCLE_COLLECTOR_ASYNC_SNOW_WHITE_FREEING, - uint32_t((TimeStamp::Now() - start).ToMilliseconds())); if (hadSnowWhiteObjects && !mContinuation) { mContinuation = true; if (NS_FAILED(NS_DispatchToCurrentThread(this))) { @@ -1317,7 +1314,6 @@ XPCJSContext::InterruptCallback(JSContext* cx) // Accumulate slow script invokation delay. if (!chrome && !self->mTimeoutAccumulated) { uint32_t delay = uint32_t(self->mSlowScriptActualWait.ToMilliseconds() - (limit * 1000.0)); - Telemetry::Accumulate(Telemetry::SLOW_SCRIPT_NOTIFY_DELAY, delay); self->mTimeoutAccumulated = true; } @@ -2955,100 +2951,7 @@ JSSizeOfTab(JSObject* objArg, size_t* jsObjectsSize, size_t* jsStringsSize, static void AccumulateTelemetryCallback(int id, uint32_t sample, const char* key) { - switch (id) { - case JS_TELEMETRY_GC_REASON: - Telemetry::Accumulate(Telemetry::GC_REASON_2, sample); - break; - case JS_TELEMETRY_GC_IS_ZONE_GC: - Telemetry::Accumulate(Telemetry::GC_IS_COMPARTMENTAL, sample); - break; - case JS_TELEMETRY_GC_MS: - Telemetry::Accumulate(Telemetry::GC_MS, sample); - break; - case JS_TELEMETRY_GC_BUDGET_MS: - Telemetry::Accumulate(Telemetry::GC_BUDGET_MS, sample); - break; - case JS_TELEMETRY_GC_ANIMATION_MS: - Telemetry::Accumulate(Telemetry::GC_ANIMATION_MS, sample); - break; - case JS_TELEMETRY_GC_MAX_PAUSE_MS: - Telemetry::Accumulate(Telemetry::GC_MAX_PAUSE_MS, sample); - break; - case JS_TELEMETRY_GC_MARK_MS: - Telemetry::Accumulate(Telemetry::GC_MARK_MS, sample); - break; - case JS_TELEMETRY_GC_SWEEP_MS: - Telemetry::Accumulate(Telemetry::GC_SWEEP_MS, sample); - break; - case JS_TELEMETRY_GC_COMPACT_MS: - Telemetry::Accumulate(Telemetry::GC_COMPACT_MS, sample); - break; - case JS_TELEMETRY_GC_MARK_ROOTS_MS: - Telemetry::Accumulate(Telemetry::GC_MARK_ROOTS_MS, sample); - break; - case JS_TELEMETRY_GC_MARK_GRAY_MS: - Telemetry::Accumulate(Telemetry::GC_MARK_GRAY_MS, sample); - break; - case JS_TELEMETRY_GC_SLICE_MS: - Telemetry::Accumulate(Telemetry::GC_SLICE_MS, sample); - break; - case JS_TELEMETRY_GC_SLOW_PHASE: - Telemetry::Accumulate(Telemetry::GC_SLOW_PHASE, sample); - break; - case JS_TELEMETRY_GC_MMU_50: - Telemetry::Accumulate(Telemetry::GC_MMU_50, sample); - break; - case JS_TELEMETRY_GC_RESET: - Telemetry::Accumulate(Telemetry::GC_RESET, sample); - break; - case JS_TELEMETRY_GC_RESET_REASON: - Telemetry::Accumulate(Telemetry::GC_RESET_REASON, sample); - break; - case JS_TELEMETRY_GC_INCREMENTAL_DISABLED: - Telemetry::Accumulate(Telemetry::GC_INCREMENTAL_DISABLED, sample); - break; - case JS_TELEMETRY_GC_NON_INCREMENTAL: - Telemetry::Accumulate(Telemetry::GC_NON_INCREMENTAL, sample); - break; - case JS_TELEMETRY_GC_NON_INCREMENTAL_REASON: - Telemetry::Accumulate(Telemetry::GC_NON_INCREMENTAL_REASON, sample); - break; - case JS_TELEMETRY_GC_SCC_SWEEP_TOTAL_MS: - Telemetry::Accumulate(Telemetry::GC_SCC_SWEEP_TOTAL_MS, sample); - break; - case JS_TELEMETRY_GC_SCC_SWEEP_MAX_PAUSE_MS: - Telemetry::Accumulate(Telemetry::GC_SCC_SWEEP_MAX_PAUSE_MS, sample); - break; - case JS_TELEMETRY_GC_MINOR_REASON: - Telemetry::Accumulate(Telemetry::GC_MINOR_REASON, sample); - break; - case JS_TELEMETRY_GC_MINOR_REASON_LONG: - Telemetry::Accumulate(Telemetry::GC_MINOR_REASON_LONG, sample); - break; - case JS_TELEMETRY_GC_MINOR_US: - Telemetry::Accumulate(Telemetry::GC_MINOR_US, sample); - break; - case JS_TELEMETRY_GC_NURSERY_BYTES: - Telemetry::Accumulate(Telemetry::GC_NURSERY_BYTES, sample); - break; - case JS_TELEMETRY_GC_PRETENURE_COUNT: - Telemetry::Accumulate(Telemetry::GC_PRETENURE_COUNT, sample); - break; - case JS_TELEMETRY_DEPRECATED_LANGUAGE_EXTENSIONS_IN_CONTENT: - Telemetry::Accumulate(Telemetry::JS_DEPRECATED_LANGUAGE_EXTENSIONS_IN_CONTENT, sample); - break; - case JS_TELEMETRY_DEPRECATED_LANGUAGE_EXTENSIONS_IN_ADDONS: - Telemetry::Accumulate(Telemetry::JS_DEPRECATED_LANGUAGE_EXTENSIONS_IN_ADDONS, sample); - break; - case JS_TELEMETRY_ADDON_EXCEPTIONS: - Telemetry::Accumulate(Telemetry::JS_TELEMETRY_ADDON_EXCEPTIONS, nsDependentCString(key), sample); - break; - case JS_TELEMETRY_AOT_USAGE: - Telemetry::Accumulate(Telemetry::JS_AOT_USAGE, sample); - break; - default: - MOZ_ASSERT_UNREACHABLE("Unexpected JS_TELEMETRY id"); - } +/* STUB */ } static void diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index cb55bb2da0..2bf20144a1 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -7491,9 +7491,6 @@ PaintTelemetry::AutoRecordPaint::~AutoRecordPaint() double totalMs = (TimeStamp::Now() - mStart).ToMilliseconds(); - // Record the total time. - Telemetry::Accumulate(Telemetry::CONTENT_PAINT_TIME, static_cast<uint32_t>(totalMs)); - // If the total time was >= 16ms, then it's likely we missed a frame due to // painting. In this case we'll gather some detailed metrics below. if (totalMs <= 16.0) { @@ -7504,9 +7501,6 @@ PaintTelemetry::AutoRecordPaint::~AutoRecordPaint() MOZ_ASSERT(aDurationMs <= totalMs); uint32_t amount = static_cast<int32_t>((aDurationMs / totalMs) * 100.0); - - nsDependentCString key(aKey); - Telemetry::Accumulate(Telemetry::CONTENT_LARGE_PAINT_PHASE_WEIGHT, key, amount); }; double dlMs = sMetrics[Metric::DisplayList]; diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index 7b87349282..8b76227ffb 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -1275,7 +1275,6 @@ nsDocumentViewer::PermitUnloadInternal(bool *aShouldPrompt, nsAutoSyncOperation sync(mDocument); mInPermitUnloadPrompt = true; - mozilla::Telemetry::Accumulate(mozilla::Telemetry::ONBEFOREUNLOAD_PROMPT_COUNT, 1); rv = prompt->ConfirmEx(title, message, buttonFlags, leaveLabel, stayLabel, nullptr, nullptr, &dummy, &buttonPressed); @@ -1290,15 +1289,12 @@ nsDocumentViewer::PermitUnloadInternal(bool *aShouldPrompt, // XXX: Are there other cases where prompts can abort? Is it ok to // prevent unloading the page in those cases? if (NS_FAILED(rv)) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::ONBEFOREUNLOAD_PROMPT_ACTION, 2); *aPermitUnload = false; return NS_OK; } // Button 0 == leave, button 1 == stay *aPermitUnload = (buttonPressed == 0); - mozilla::Telemetry::Accumulate(mozilla::Telemetry::ONBEFOREUNLOAD_PROMPT_ACTION, - (*aPermitUnload ? 1 : 0)); // If the user decided to go ahead, make sure not to prompt the user again // by toggling the internal prompting bool to false: if (*aPermitUnload) { diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 062fbfe158..d0f790a0be 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -3569,8 +3569,6 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram } builder.LeavePresShell(aFrame, &list); - Telemetry::AccumulateTimeDelta(Telemetry::PAINT_BUILD_DISPLAYLIST_TIME, - startBuildDisplayList); bool profilerNeedsDisplayList = profiler_feature_active("displaylistdump"); bool consoleNeedsDisplayList = gfxUtils::DumpDisplayList() || gfxEnv::DumpPaint(); @@ -3651,8 +3649,6 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram TimeStamp paintStart = TimeStamp::Now(); RefPtr<LayerManager> layerManager = list.PaintRoot(&builder, aRenderingContext, flags); - Telemetry::AccumulateTimeDelta(Telemetry::PAINT_RASTERIZE_TIME, - paintStart); if (gfxPrefs::GfxLoggingPaintedPixelCountEnabled()) { TimeStamp now = TimeStamp::Now(); diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 3e5320c220..88539dc4a5 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -1114,17 +1114,6 @@ PresShell::Destroy() if (mPresContext) { const bool mayFlushUserFontSet = false; gfxUserFontSet* fs = mPresContext->GetUserFontSet(mayFlushUserFontSet); - if (fs) { - uint32_t fontCount; - uint64_t fontSize; - fs->GetLoadStatistics(fontCount, fontSize); - Telemetry::Accumulate(Telemetry::WEBFONT_PER_PAGE, fontCount); - Telemetry::Accumulate(Telemetry::WEBFONT_SIZE_PER_PAGE, - uint32_t(fontSize/1024)); - } else { - Telemetry::Accumulate(Telemetry::WEBFONT_PER_PAGE, 0); - Telemetry::Accumulate(Telemetry::WEBFONT_SIZE_PER_PAGE, 0); - } } #ifdef MOZ_REFLOW_PERF @@ -2276,8 +2265,6 @@ PresShell::ScrollPage(bool aForward) nsIScrollableFrame* scrollFrame = GetFrameToScrollAsScrollable(nsIPresShell::eVertical); if (scrollFrame) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::MainThreadScrollPage); scrollFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1), nsIScrollableFrame::PAGES, nsIScrollableFrame::SMOOTH, @@ -2294,9 +2281,6 @@ PresShell::ScrollLine(bool aForward) nsIScrollableFrame* scrollFrame = GetFrameToScrollAsScrollable(nsIPresShell::eVertical); if (scrollFrame) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::MainThreadScrollLine); - int32_t lineCount = Preferences::GetInt("toolkit.scrollbox.verticalScrollDistance", NS_DEFAULT_VERTICAL_SCROLL_DISTANCE); scrollFrame->ScrollBy(nsIntPoint(0, aForward ? lineCount : -lineCount), @@ -2315,8 +2299,6 @@ PresShell::ScrollCharacter(bool aRight) nsIScrollableFrame* scrollFrame = GetFrameToScrollAsScrollable(nsIPresShell::eHorizontal); if (scrollFrame) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::MainThreadScrollCharacter); int32_t h = Preferences::GetInt("toolkit.scrollbox.horizontalScrollDistance", NS_DEFAULT_HORIZONTAL_SCROLL_DISTANCE); scrollFrame->ScrollBy(nsIntPoint(aRight ? h : -h, 0), @@ -2335,8 +2317,6 @@ PresShell::CompleteScroll(bool aForward) nsIScrollableFrame* scrollFrame = GetFrameToScrollAsScrollable(nsIPresShell::eVertical); if (scrollFrame) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::MainThreadCompleteScroll); scrollFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1), nsIScrollableFrame::WHOLE, nsIScrollableFrame::SMOOTH, @@ -8231,16 +8211,6 @@ PresShell::HandleEventInternal(WidgetEvent* aEvent, } } - if (Telemetry::CanRecordBase() && - !aEvent->mTimeStamp.IsNull() && - aEvent->AsInputEvent()) { - double millis = (TimeStamp::Now() - aEvent->mTimeStamp).ToMilliseconds(); - Telemetry::Accumulate(Telemetry::INPUT_EVENT_RESPONSE_MS, millis); - if (mDocument && mDocument->GetReadyStateEnum() != nsIDocument::READYSTATE_COMPLETE) { - Telemetry::Accumulate(Telemetry::LOAD_INPUT_EVENT_RESPONSE_MS, millis); - } - } - return rv; } @@ -9522,16 +9492,6 @@ PresShell::ProcessReflowCommands(bool aInterruptible) UnsuppressAndInvalidate(); } - if (mDocument->GetRootElement()) { - TimeDuration elapsed = TimeStamp::Now() - timerStart; - int32_t intElapsed = int32_t(elapsed.ToMilliseconds()); - - if (intElapsed > NS_LONG_REFLOW_TIME_MS) { - Telemetry::Accumulate(Telemetry::LONG_REFLOW_INTERRUPTIBLE, - aInterruptible ? 1 : 0); - } - } - return !interrupted; } diff --git a/layout/base/nsRefreshDriver.cpp b/layout/base/nsRefreshDriver.cpp index 6676bea977..bc1a27852b 100644 --- a/layout/base/nsRefreshDriver.cpp +++ b/layout/base/nsRefreshDriver.cpp @@ -526,10 +526,6 @@ private: if (XRE_IsParentProcess()) { TimeDuration vsyncLatency = TimeStamp::Now() - aVsyncTimestamp; uint32_t sample = (uint32_t)vsyncLatency.ToMilliseconds(); - Telemetry::Accumulate(Telemetry::FX_REFRESH_DRIVER_CHROME_FRAME_DELAY_MS, - sample); - Telemetry::Accumulate(Telemetry::FX_REFRESH_DRIVER_SYNC_SCROLL_FRAME_DELAY_MS, - sample); RecordJank(sample); } else if (mVsyncRate != TimeDuration::Forever()) { TimeDuration contentDelay = (TimeStamp::Now() - mLastChildTick) - mVsyncRate; @@ -539,10 +535,6 @@ private: contentDelay = TimeDuration::FromMilliseconds(0); } uint32_t sample = (uint32_t)contentDelay.ToMilliseconds(); - Telemetry::Accumulate(Telemetry::FX_REFRESH_DRIVER_CONTENT_FRAME_DELAY_MS, - sample); - Telemetry::Accumulate(Telemetry::FX_REFRESH_DRIVER_SYNC_SCROLL_FRAME_DELAY_MS, - sample); RecordJank(sample); } else { // Request the vsync rate from the parent process. Might be a few vsyncs @@ -2027,10 +2019,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime) notifyGC = true; } -#ifndef ANDROID /* bug 1142079 */ - mozilla::Telemetry::AccumulateTimeDelta(mozilla::Telemetry::REFRESH_DRIVER_TICK, mTickStart); -#endif - nsTObserverArray<nsAPostRefreshObserver*>::ForwardIterator iter(mPostRefreshObservers); while (iter.HasMore()) { nsAPostRefreshObserver* observer = iter.GetNext(); diff --git a/layout/generic/nsSelection.cpp b/layout/generic/nsSelection.cpp index a2227c39c3..ec0fba3087 100644 --- a/layout/generic/nsSelection.cpp +++ b/layout/generic/nsSelection.cpp @@ -2201,8 +2201,6 @@ nsFrameSelection::CommonPageMove(bool aForward, return; // scroll one page - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::MainThreadScrollPage); aScrollableFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1), nsIScrollableFrame::PAGES, nsIScrollableFrame::SMOOTH); @@ -6202,11 +6200,6 @@ Selection::ScrollIntoView(SelectionRegion aRegion, flags |= nsIPresShell::SCROLL_OVERFLOW_HIDDEN; } - if (aFlags & Selection::SCROLL_FOR_CARET_MOVE) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::MainThreadScrollCaretIntoView); - } - presShell->ScrollFrameRectIntoView(frame, rect, aVertical, aHorizontal, flags); return NS_OK; diff --git a/layout/style/FontFaceSet.cpp b/layout/style/FontFaceSet.cpp index 550a7d71a3..1645adfefe 100644 --- a/layout/style/FontFaceSet.cpp +++ b/layout/style/FontFaceSet.cpp @@ -1762,18 +1762,10 @@ FontFaceSet::UserFontSet::RecordFontLoadDone(uint32_t aFontSize, { mDownloadCount++; mDownloadSize += aFontSize; - Telemetry::Accumulate(Telemetry::WEBFONT_SIZE, aFontSize / 1024); if (!mFontFaceSet) { return; } - - TimeStamp navStart = mFontFaceSet->GetNavigationStartTimeStamp(); - TimeStamp zero; - if (navStart != zero) { - Telemetry::AccumulateTimeDelta(Telemetry::WEBFONT_DOWNLOAD_TIME_AFTER_START, - navStart, aDoneTime); - } } /* virtual */ nsresult diff --git a/layout/style/nsFontFaceLoader.cpp b/layout/style/nsFontFaceLoader.cpp index f5a0a9f347..3082bbf873 100644 --- a/layout/style/nsFontFaceLoader.cpp +++ b/layout/style/nsFontFaceLoader.cpp @@ -205,7 +205,6 @@ nsFontFaceLoader::OnStreamComplete(nsIStreamLoader* aLoader, TimeStamp doneTime = TimeStamp::Now(); TimeDuration downloadTime = doneTime - mStartTime; uint32_t downloadTimeMS = uint32_t(downloadTime.ToMilliseconds()); - Telemetry::Accumulate(Telemetry::WEBFONT_DOWNLOAD_TIME, downloadTimeMS); if (GetFontDisplay() == NS_FONT_DISPLAY_FALLBACK) { uint32_t loadTimeout = GetFallbackDelay(); diff --git a/layout/xul/nsScrollbarButtonFrame.cpp b/layout/xul/nsScrollbarButtonFrame.cpp index 206d9717f6..ff757a65fd 100644 --- a/layout/xul/nsScrollbarButtonFrame.cpp +++ b/layout/xul/nsScrollbarButtonFrame.cpp @@ -171,9 +171,6 @@ nsScrollbarButtonFrame::HandleButtonPress(nsPresContext* aPresContext, return false; } - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::MainThreadScrollbarButtonClick); - if (!m) { sb->MoveToNewPosition(); if (!weakFrame.IsAlive()) { diff --git a/layout/xul/nsSliderFrame.cpp b/layout/xul/nsSliderFrame.cpp index 8e083f20ca..3c1f9ef912 100644 --- a/layout/xul/nsSliderFrame.cpp +++ b/layout/xul/nsSliderFrame.cpp @@ -529,9 +529,6 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext, return NS_OK; } - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::MainThreadScrollbarDrag); - // take our current position and subtract the start location pos -= mDragStart; bool isMouseOutsideThumb = false; @@ -598,9 +595,6 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext, nsSize thumbSize = thumbFrame->GetSize(); nscoord thumbLength = isHorizontal ? thumbSize.width : thumbSize.height; - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::MainThreadScrollbarTrackClick); - // set it nsWeakFrame weakFrame(this); // should aMaySnap be true here? diff --git a/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp b/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp index 2c57431e78..e36b8b6cf4 100755 --- a/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp +++ b/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp @@ -706,15 +706,6 @@ WebrtcAudioConduit::GetAudioFrame(int16_t speechData[], if (GetAVStats(&jitter_buffer_delay_ms, &playout_buffer_delay_ms, &avsync_offset_ms)) { -#if !defined(MOZILLA_EXTERNAL_LINKAGE) - if (avsync_offset_ms < 0) { - Telemetry::Accumulate(Telemetry::WEBRTC_AVSYNC_WHEN_VIDEO_LAGS_AUDIO_MS, - -avsync_offset_ms); - } else { - Telemetry::Accumulate(Telemetry::WEBRTC_AVSYNC_WHEN_AUDIO_LAGS_VIDEO_MS, - avsync_offset_ms); - } -#endif CSFLogError(logTag, "A/V sync: sync delta: %dms, audio jitter delay %dms, playout delay %dms", avsync_offset_ms, jitter_buffer_delay_ms, playout_buffer_delay_ms); diff --git a/media/webrtc/signaling/src/media-conduit/CodecStatistics.cpp b/media/webrtc/signaling/src/media-conduit/CodecStatistics.cpp index eb03c0bf80..da40a59eac 100644 --- a/media/webrtc/signaling/src/media-conduit/CodecStatistics.cpp +++ b/media/webrtc/signaling/src/media-conduit/CodecStatistics.cpp @@ -124,8 +124,6 @@ void VideoCodecStatistics::ReceiveStateChange(const int aChannel, TimeDuration timeDelta = TimeStamp::Now() - mReceiveFailureTime; CSFLogError(logTag, "Video error duration: %u ms", static_cast<uint32_t>(timeDelta.ToMilliseconds())); - Telemetry::Accumulate(Telemetry::WEBRTC_VIDEO_ERROR_RECOVERY_MS, - static_cast<uint32_t>(timeDelta.ToMilliseconds())); mRecoveredLosses++; // to calculate losses per minute mTotalLossTime += timeDelta; // To calculate % time in recovery @@ -147,16 +145,10 @@ void VideoCodecStatistics::EndOfCallStats() if (callDelta.ToSeconds() != 0) { uint32_t recovered_per_min = mRecoveredBeforeLoss/(callDelta.ToSeconds()/60); CSFLogError(logTag, "Video recovery before error per min %u", recovered_per_min); - Telemetry::Accumulate(Telemetry::WEBRTC_VIDEO_RECOVERY_BEFORE_ERROR_PER_MIN, - recovered_per_min); uint32_t err_per_min = mRecoveredLosses/(callDelta.ToSeconds()/60); CSFLogError(logTag, "Video recovery after error per min %u", err_per_min); - Telemetry::Accumulate(Telemetry::WEBRTC_VIDEO_RECOVERY_AFTER_ERROR_PER_MIN, - err_per_min); float percent = (mTotalLossTime.ToSeconds()*100)/callDelta.ToSeconds(); CSFLogError(logTag, "Video error time percentage %f%%", percent); - Telemetry::Accumulate(Telemetry::WEBRTC_VIDEO_DECODE_ERROR_TIME_PERMILLE, - static_cast<uint32_t>(percent*10)); } } #endif diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp index 33422ed7a6..43d10ca86b 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp @@ -2245,22 +2245,6 @@ PeerConnectionImpl::AddIceCandidate(const char* aCandidate, const char* aMid, un CSFLogDebug(logTag, "AddIceCandidate: %s", aCandidate); -#if !defined(MOZILLA_EXTERNAL_LINKAGE) - // When remote candidates are added before our ICE ctx is up and running - // (the transition to New is async through STS, so this is not impossible), - // we won't record them as trickle candidates. Is this what we want? - if(!mIceStartTime.IsNull()) { - TimeDuration timeDelta = TimeStamp::Now() - mIceStartTime; - if (mIceConnectionState == PCImplIceConnectionState::Failed) { - Telemetry::Accumulate(Telemetry::WEBRTC_ICE_LATE_TRICKLE_ARRIVAL_TIME, - timeDelta.ToMilliseconds()); - } else { - Telemetry::Accumulate(Telemetry::WEBRTC_ICE_ON_TIME_TRICKLE_ARRIVAL_TIME, - timeDelta.ToMilliseconds()); - } - } -#endif - nsresult res = mJsepSession->AddRemoteIceCandidate(aCandidate, aMid, aLevel); if (NS_SUCCEEDED(res)) { @@ -3011,49 +2995,7 @@ PeerConnectionImpl::PluginCrash(uint32_t aPluginID, void PeerConnectionImpl::RecordEndOfCallTelemetry() const { - if (!mJsepSession) { - return; - } - -#if !defined(MOZILLA_EXTERNAL_LINKAGE) - // Bitmask used for WEBRTC/LOOP_CALL_TYPE telemetry reporting - static const uint32_t kAudioTypeMask = 1; - static const uint32_t kVideoTypeMask = 2; - static const uint32_t kDataChannelTypeMask = 4; - - // Report end-of-call Telemetry - if (mJsepSession->GetNegotiations() > 0) { - Telemetry::Accumulate(Telemetry::WEBRTC_RENEGOTIATIONS, - mJsepSession->GetNegotiations()-1); - } - Telemetry::Accumulate(Telemetry::WEBRTC_MAX_VIDEO_SEND_TRACK, - mMaxSending[SdpMediaSection::MediaType::kVideo]); - Telemetry::Accumulate(Telemetry::WEBRTC_MAX_VIDEO_RECEIVE_TRACK, - mMaxReceiving[SdpMediaSection::MediaType::kVideo]); - Telemetry::Accumulate(Telemetry::WEBRTC_MAX_AUDIO_SEND_TRACK, - mMaxSending[SdpMediaSection::MediaType::kAudio]); - Telemetry::Accumulate(Telemetry::WEBRTC_MAX_AUDIO_RECEIVE_TRACK, - mMaxReceiving[SdpMediaSection::MediaType::kAudio]); - // DataChannels appear in both Sending and Receiving - Telemetry::Accumulate(Telemetry::WEBRTC_DATACHANNEL_NEGOTIATED, - mMaxSending[SdpMediaSection::MediaType::kApplication]); - // Enumerated/bitmask: 1 = Audio, 2 = Video, 4 = DataChannel - // A/V = 3, A/V/D = 7, etc - uint32_t type = 0; - if (mMaxSending[SdpMediaSection::MediaType::kAudio] || - mMaxReceiving[SdpMediaSection::MediaType::kAudio]) { - type = kAudioTypeMask; - } - if (mMaxSending[SdpMediaSection::MediaType::kVideo] || - mMaxReceiving[SdpMediaSection::MediaType::kVideo]) { - type |= kVideoTypeMask; - } - if (mMaxSending[SdpMediaSection::MediaType::kApplication]) { - type |= kDataChannelTypeMask; - } - Telemetry::Accumulate(Telemetry::WEBRTC_CALL_TYPE, - type); -#endif + /* STUB */ } nsresult @@ -3109,13 +3051,6 @@ PeerConnectionImpl::ShutdownMedia() pair.second->RemovePrincipalChangeObserver(this); } } - - // End of call to be recorded in Telemetry - if (!mStartTime.IsNull()){ - TimeDuration timeDelta = TimeStamp::Now() - mStartTime; - Telemetry::Accumulate(Telemetry::WEBRTC_CALL_DURATION, - timeDelta.ToSeconds()); - } #endif // Forget the reference so that we can transfer it to @@ -3423,33 +3358,6 @@ void PeerConnectionImpl::IceConnectionStateChange( return; } -#if !defined(MOZILLA_EXTERNAL_LINKAGE) - if (!isDone(mIceConnectionState) && isDone(domState)) { - // mIceStartTime can be null if going directly from New to Closed, in which - // case we don't count it as a success or a failure. - if (!mIceStartTime.IsNull()){ - TimeDuration timeDelta = TimeStamp::Now() - mIceStartTime; - if (isSucceeded(domState)) { - Telemetry::Accumulate(Telemetry::WEBRTC_ICE_SUCCESS_TIME, - timeDelta.ToMilliseconds()); - } else if (isFailed(domState)) { - Telemetry::Accumulate(Telemetry::WEBRTC_ICE_FAILURE_TIME, - timeDelta.ToMilliseconds()); - } - } - - if (isSucceeded(domState)) { - Telemetry::Accumulate( - Telemetry::WEBRTC_ICE_ADD_CANDIDATE_ERRORS_GIVEN_SUCCESS, - mAddCandidateErrorCount); - } else if (isFailed(domState)) { - Telemetry::Accumulate( - Telemetry::WEBRTC_ICE_ADD_CANDIDATE_ERRORS_GIVEN_FAILURE, - mAddCandidateErrorCount); - } - } -#endif - mIceConnectionState = domState; if (mIceConnectionState == PCImplIceConnectionState::Connected || @@ -3467,10 +3375,6 @@ void PeerConnectionImpl::IceConnectionStateChange( STAMP_TIMECARD(mTimeCard, "Ice state: new"); break; case PCImplIceConnectionState::Checking: -#if !defined(MOZILLA_EXTERNAL_LINKAGE) - // For telemetry - mIceStartTime = TimeStamp::Now(); -#endif STAMP_TIMECARD(mTimeCard, "Ice state: checking"); break; case PCImplIceConnectionState::Connected: @@ -4067,16 +3971,7 @@ PeerConnectionImpl::IceStreamReady(NrIceMediaStream *aStream) //Telemetry for when calls start void PeerConnectionImpl::startCallTelem() { - if (!mStartTime.IsNull()) { - return; - } - - // Start time for calls - mStartTime = TimeStamp::Now(); - - // Increment session call counter - // If we want to track Loop calls independently here, we need two histograms. - Telemetry::Accumulate(Telemetry::WEBRTC_CALL_COUNT_2, 1); + /* STUB */ } #endif diff --git a/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp b/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp index 96bdd5b70f..f283d61110 100644 --- a/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp +++ b/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp @@ -1194,18 +1194,8 @@ static void GetStatsForLongTermStorage_s( rate_limit_bit_pattern |= 2; } - if (query->failed) { - Telemetry::Accumulate( - Telemetry::WEBRTC_STUN_RATE_LIMIT_EXCEEDED_BY_TYPE_GIVEN_FAILURE, - rate_limit_bit_pattern); - } else { - Telemetry::Accumulate( - Telemetry::WEBRTC_STUN_RATE_LIMIT_EXCEEDED_BY_TYPE_GIVEN_SUCCESS, - rate_limit_bit_pattern); - } - - // Even if Telemetry::Accumulate is threadsafe, we still need to send the - // query back to main, since that is where it must be destroyed. + // We still need to send the query back to main, since that is where + // it must be destroyed. NS_DispatchToMainThread( WrapRunnableNM( &StoreLongTermICEStatisticsImpl_m, @@ -1216,8 +1206,6 @@ static void GetStatsForLongTermStorage_s( void WebrtcGlobalInformation::StoreLongTermICEStatistics( PeerConnectionImpl& aPc) { - Telemetry::Accumulate(Telemetry::WEBRTC_ICE_FINAL_CONNECTION_STATE, - static_cast<uint32_t>(aPc.IceConnectionState())); if (aPc.IceConnectionState() == PCImplIceConnectionState::New) { // ICE has not started; we won't have any remote candidates, so recording diff --git a/modules/libjar/nsJARChannel.cpp b/modules/libjar/nsJARChannel.cpp index 4b6b78c6d2..ee60602dae 100644 --- a/modules/libjar/nsJARChannel.cpp +++ b/modules/libjar/nsJARChannel.cpp @@ -22,7 +22,6 @@ #include "nsIFileURL.h" #include "mozilla/Preferences.h" -#include "mozilla/Telemetry.h" #include "nsITabChild.h" #include "private/pprio.h" #include "nsInputStreamPump.h" @@ -791,12 +790,6 @@ nsJARChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *ctx) return NS_ERROR_UNSAFE_CONTENT_TYPE; } - static bool reportedRemoteJAR = false; - if (!reportedRemoteJAR) { - reportedRemoteJAR = true; - Telemetry::Accumulate(Telemetry::REMOTE_JAR_PROTOCOL_USED, 1); - } - // kick off an async download of the base URI... nsCOMPtr<nsIStreamListener> downloader = new MemoryDownloader(this); uint32_t loadFlags = diff --git a/netwerk/base/BackgroundFileSaver.cpp b/netwerk/base/BackgroundFileSaver.cpp index e4bc058262..cfe94e35ba 100644 --- a/netwerk/base/BackgroundFileSaver.cpp +++ b/netwerk/base/BackgroundFileSaver.cpp @@ -798,8 +798,6 @@ BackgroundFileSaver::NotifySaveComplete() // during the session in a telemetry histogram, and we reset the maximum // thread counter for the next download session if (sThreadCount == 0) { - Telemetry::Accumulate(Telemetry::BACKGROUNDFILESAVER_THREAD_COUNT, - sTelemetryMaxThreadCount); sTelemetryMaxThreadCount = 0; } diff --git a/netwerk/base/Predictor.cpp b/netwerk/base/Predictor.cpp index e97b11d162..12e4eb4155 100644 --- a/netwerk/base/Predictor.cpp +++ b/netwerk/base/Predictor.cpp @@ -294,26 +294,9 @@ Predictor::Action::OnCacheEntryAvailable(nsICacheEntry *entry, bool isNew, "Aborting.", this, result)); return NS_OK; } - Telemetry::AccumulateTimeDelta(Telemetry::PREDICTOR_WAIT_TIME, - mStartTime); - if (mPredict) { - bool predicted = mPredictor->PredictInternal(mPredictReason, entry, isNew, - mFullUri, mTargetURI, - mVerifier, mStackCount); - Telemetry::AccumulateTimeDelta( - Telemetry::PREDICTOR_PREDICT_WORK_TIME, mStartTime); - if (predicted) { - Telemetry::AccumulateTimeDelta( - Telemetry::PREDICTOR_PREDICT_TIME_TO_ACTION, mStartTime); - } else { - Telemetry::AccumulateTimeDelta( - Telemetry::PREDICTOR_PREDICT_TIME_TO_INACTION, mStartTime); - } - } else { + if (!mPredict) { mPredictor->LearnInternal(mLearnReason, entry, isNew, mFullUri, mTargetURI, mSourceURI); - Telemetry::AccumulateTimeDelta( - Telemetry::PREDICTOR_LEARN_WORK_TIME, mStartTime); } return NS_OK; @@ -1073,8 +1056,6 @@ Predictor::CalculateGlobalDegradation(uint32_t lastLoad) globalDegradation = mPageDegradationMax; } - Telemetry::Accumulate(Telemetry::PREDICTOR_GLOBAL_DEGRADATION, - globalDegradation); return globalDegradation; } @@ -1139,10 +1120,6 @@ Predictor::CalculateConfidence(uint32_t hitCount, uint32_t hitsPossible, confidence = std::max(confidence, 0); confidence = std::min(confidence, maxConfidence); - Telemetry::Accumulate(Telemetry::PREDICTOR_BASE_CONFIDENCE, baseConfidence); - Telemetry::Accumulate(Telemetry::PREDICTOR_SUBRESOURCE_DEGRADATION, - confidenceDegradation); - Telemetry::Accumulate(Telemetry::PREDICTOR_CONFIDENCE, confidence); return confidence; } @@ -2335,7 +2312,6 @@ Predictor::PrefetchListener::OnStopRequest(nsIRequest *aRequest, if (NS_FAILED(aStatusCode)) { return aStatusCode; } - Telemetry::AccumulateTimeDelta(Telemetry::PREDICTOR_PREFETCH_TIME, mStartTime); nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aRequest); if (!httpChannel) { diff --git a/netwerk/base/nsLoadGroup.cpp b/netwerk/base/nsLoadGroup.cpp index 51d5a9ca7e..9981bd6989 100644 --- a/netwerk/base/nsLoadGroup.cpp +++ b/netwerk/base/nsLoadGroup.cpp @@ -14,7 +14,6 @@ #include "mozilla/Logging.h" #include "nsString.h" #include "nsTArray.h" -#include "mozilla/Telemetry.h" #include "nsITimedChannel.h" #include "nsIInterfaceRequestor.h" #include "nsIRequestObserver.h" @@ -574,40 +573,6 @@ nsLoadGroup::RemoveRequest(nsIRequest *request, nsISupports* ctxt, mRequests.RemoveEntry(entry); - // Collect telemetry stats only when default request is a timed channel. - // Don't include failed requests in the timing statistics. - if (mDefaultLoadIsTimed && NS_SUCCEEDED(aStatus)) { - nsCOMPtr<nsITimedChannel> timedChannel = do_QueryInterface(request); - if (timedChannel) { - // Figure out if this request was served from the cache - ++mTimedRequests; - TimeStamp timeStamp; - rv = timedChannel->GetCacheReadStart(&timeStamp); - if (NS_SUCCEEDED(rv) && !timeStamp.IsNull()) { - ++mCachedRequests; - } - else { - mTimedNonCachedRequestsUntilOnEndPageLoad++; - } - - rv = timedChannel->GetAsyncOpen(&timeStamp); - if (NS_SUCCEEDED(rv) && !timeStamp.IsNull()) { - Telemetry::AccumulateTimeDelta( - Telemetry::HTTP_SUBITEM_OPEN_LATENCY_TIME, - mDefaultRequestCreationTime, timeStamp); - } - - rv = timedChannel->GetResponseStart(&timeStamp); - if (NS_SUCCEEDED(rv) && !timeStamp.IsNull()) { - Telemetry::AccumulateTimeDelta( - Telemetry::HTTP_SUBITEM_FIRST_BYTE_LATENCY_TIME, - mDefaultRequestCreationTime, timeStamp); - } - - TelemetryReportChannel(timedChannel, false); - } - } - if (mRequests.EntryCount() == 0) { TelemetryReport(); } @@ -815,19 +780,7 @@ nsLoadGroup::SetDefaultLoadFlags(uint32_t aFlags) void nsLoadGroup::TelemetryReport() { - if (mDefaultLoadIsTimed) { - Telemetry::Accumulate(Telemetry::HTTP_REQUEST_PER_PAGE, mTimedRequests); - if (mTimedRequests) { - Telemetry::Accumulate(Telemetry::HTTP_REQUEST_PER_PAGE_FROM_CACHE, - mCachedRequests * 100 / mTimedRequests); - } - - nsCOMPtr<nsITimedChannel> timedChannel = - do_QueryInterface(mDefaultLoadRequest); - if (timedChannel) - TelemetryReportChannel(timedChannel, true); - } - + /* STUB */ mTimedRequests = 0; mCachedRequests = 0; mDefaultLoadIsTimed = false; @@ -898,116 +851,6 @@ nsLoadGroup::TelemetryReportChannel(nsITimedChannel *aTimedChannel, rv = aTimedChannel->GetResponseEnd(&responseEnd); if (NS_FAILED(rv)) return; - -#define HTTP_REQUEST_HISTOGRAMS(prefix) \ - if (!domainLookupStart.IsNull()) { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_DNS_ISSUE_TIME, \ - asyncOpen, domainLookupStart); \ - } \ - \ - if (!domainLookupStart.IsNull() && !domainLookupEnd.IsNull()) { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_DNS_LOOKUP_TIME, \ - domainLookupStart, domainLookupEnd); \ - } \ - \ - if (!secureConnectionStart.IsNull() && !connectEnd.IsNull()) { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_TLS_HANDSHAKE, \ - secureConnectionStart, connectEnd); \ - } \ - \ - if (!connectStart.IsNull() && !connectEnd.IsNull()) { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_TCP_CONNECTION_2, \ - connectStart, connectEnd); \ - } \ - \ - \ - if (!requestStart.IsNull() && !responseEnd.IsNull()) { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_OPEN_TO_FIRST_SENT, \ - asyncOpen, requestStart); \ - \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_FIRST_SENT_TO_LAST_RECEIVED, \ - requestStart, responseEnd); \ - \ - if (cacheReadStart.IsNull() && !responseStart.IsNull()) { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_OPEN_TO_FIRST_RECEIVED, \ - asyncOpen, responseStart); \ - } \ - } \ - \ - if (!cacheReadStart.IsNull() && !cacheReadEnd.IsNull()) { \ - if (!CacheObserver::UseNewCache()) { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_OPEN_TO_FIRST_FROM_CACHE, \ - asyncOpen, cacheReadStart); \ - } else { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_OPEN_TO_FIRST_FROM_CACHE_V2, \ - asyncOpen, cacheReadStart); \ - } \ - \ - if (!CacheObserver::UseNewCache()) { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_CACHE_READ_TIME, \ - cacheReadStart, cacheReadEnd); \ - } else { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_CACHE_READ_TIME_V2, \ - cacheReadStart, cacheReadEnd); \ - } \ - \ - if (!requestStart.IsNull() && !responseEnd.IsNull()) { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_REVALIDATION, \ - requestStart, responseEnd); \ - } \ - } \ - \ - if (!cacheReadEnd.IsNull()) { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_COMPLETE_LOAD, \ - asyncOpen, cacheReadEnd); \ - \ - if (!CacheObserver::UseNewCache()) { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_COMPLETE_LOAD_CACHED, \ - asyncOpen, cacheReadEnd); \ - } else { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_COMPLETE_LOAD_CACHED_V2, \ - asyncOpen, cacheReadEnd); \ - } \ - } \ - else if (!responseEnd.IsNull()) { \ - if (!CacheObserver::UseNewCache()) { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_COMPLETE_LOAD, \ - asyncOpen, responseEnd); \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_COMPLETE_LOAD_NET, \ - asyncOpen, responseEnd); \ - } else { \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_COMPLETE_LOAD_V2, \ - asyncOpen, responseEnd); \ - Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_COMPLETE_LOAD_NET_V2, \ - asyncOpen, responseEnd); \ - } \ - } - - if (aDefaultRequest) { - HTTP_REQUEST_HISTOGRAMS(PAGE) - } else { - HTTP_REQUEST_HISTOGRAMS(SUB) - } -#undef HTTP_REQUEST_HISTOGRAMS } nsresult nsLoadGroup::MergeLoadFlags(nsIRequest *aRequest, diff --git a/netwerk/base/nsNetUtil.cpp b/netwerk/base/nsNetUtil.cpp index d60c909c52..653a9003ee 100644 --- a/netwerk/base/nsNetUtil.cpp +++ b/netwerk/base/nsNetUtil.cpp @@ -2262,7 +2262,6 @@ NS_ShouldSecureUpgrade(nsIURI* aURI, nsIScriptError::warningFlag, "CSP", innerWindowId); - Telemetry::Accumulate(Telemetry::HTTP_SCHEME_UPGRADE, 4); aShouldUpgrade = true; return NS_OK; } @@ -2285,17 +2284,10 @@ NS_ShouldSecureUpgrade(nsIURI* aURI, if (isStsHost) { LOG(("nsHttpChannel::Connect() STS permissions found\n")); if (aAllowSTS) { - Telemetry::Accumulate(Telemetry::HTTP_SCHEME_UPGRADE, 3); aShouldUpgrade = true; return NS_OK; - } else { - Telemetry::Accumulate(Telemetry::HTTP_SCHEME_UPGRADE, 2); } - } else { - Telemetry::Accumulate(Telemetry::HTTP_SCHEME_UPGRADE, 1); } - } else { - Telemetry::Accumulate(Telemetry::HTTP_SCHEME_UPGRADE, 0); } aShouldUpgrade = false; return NS_OK; diff --git a/netwerk/base/nsSocketTransport2.cpp b/netwerk/base/nsSocketTransport2.cpp index 184757d33c..f9b55ead4d 100644 --- a/netwerk/base/nsSocketTransport2.cpp +++ b/netwerk/base/nsSocketTransport2.cpp @@ -1596,17 +1596,6 @@ nsSocketTransport::RecoverFromError() bool tryAgain = false; - if ((mState == STATE_CONNECTING) && mDNSRecord && - mSocketTransportService->IsTelemetryEnabledAndNotSleepPhase()) { - if (mNetAddr.raw.family == AF_INET) { - Telemetry::Accumulate(Telemetry::IPV4_AND_IPV6_ADDRESS_CONNECTIVITY, - UNSUCCESSFUL_CONNECTING_TO_IPV4_ADDRESS); - } else if (mNetAddr.raw.family == AF_INET6) { - Telemetry::Accumulate(Telemetry::IPV4_AND_IPV6_ADDRESS_CONNECTIVITY, - UNSUCCESSFUL_CONNECTING_TO_IPV6_ADDRESS); - } - } - if (mConnectionFlags & (DISABLE_IPV6 | DISABLE_IPV4) && mCondition == NS_ERROR_UNKNOWN_HOST && mState == STATE_RESOLVING && @@ -1996,18 +1985,6 @@ nsSocketTransport::OnSocketReady(PRFileDesc *fd, int16_t outFlags) // we are connected! // OnSocketConnected(); - - if (mSocketTransportService->IsTelemetryEnabledAndNotSleepPhase()) { - if (mNetAddr.raw.family == AF_INET) { - Telemetry::Accumulate( - Telemetry::IPV4_AND_IPV6_ADDRESS_CONNECTIVITY, - SUCCESSFUL_CONNECTING_TO_IPV4_ADDRESS); - } else if (mNetAddr.raw.family == AF_INET6) { - Telemetry::Accumulate( - Telemetry::IPV4_AND_IPV6_ADDRESS_CONNECTIVITY, - SUCCESSFUL_CONNECTING_TO_IPV6_ADDRESS); - } - } } else { PRErrorCode code = PR_GetError(); @@ -3201,28 +3178,7 @@ nsSocketTransport::SendPRBlockingTelemetry(PRIntervalTime aStart, Telemetry::ID aIDLinkChange, Telemetry::ID aIDOffline) { - PRIntervalTime now = PR_IntervalNow(); - if (gIOService->IsNetTearingDown()) { - Telemetry::Accumulate(aIDShutdown, - PR_IntervalToMilliseconds(now - aStart)); - - } else if (PR_IntervalToSeconds(now - gIOService->LastConnectivityChange()) - < 60) { - Telemetry::Accumulate(aIDConnectivityChange, - PR_IntervalToMilliseconds(now - aStart)); - } else if (PR_IntervalToSeconds(now - gIOService->LastNetworkLinkChange()) - < 60) { - Telemetry::Accumulate(aIDLinkChange, - PR_IntervalToMilliseconds(now - aStart)); - - } else if (PR_IntervalToSeconds(now - gIOService->LastOfflineStateChange()) - < 60) { - Telemetry::Accumulate(aIDOffline, - PR_IntervalToMilliseconds(now - aStart)); - } else { - Telemetry::Accumulate(aIDNormal, - PR_IntervalToMilliseconds(now - aStart)); - } + /* STUB */ } } // namespace net diff --git a/netwerk/base/nsSocketTransportService2.cpp b/netwerk/base/nsSocketTransportService2.cpp index 068bf0eca9..72afdc9e19 100644 --- a/netwerk/base/nsSocketTransportService2.cpp +++ b/netwerk/base/nsSocketTransportService2.cpp @@ -219,7 +219,6 @@ nsSocketTransportService::CanAttachSocket() if (mTelemetryEnabledPref && (((total >= 900) || !rv) && !reported900FDLimit)) { reported900FDLimit = true; - Telemetry::Accumulate(Telemetry::NETWORK_SESSION_AT_900FD, true); } return rv; @@ -898,16 +897,6 @@ nsSocketTransportService::Run() DoPollIteration(&singlePollDuration); - if (mTelemetryEnabledPref && !pollCycleStart.IsNull()) { - Telemetry::Accumulate(Telemetry::STS_POLL_BLOCK_TIME, - singlePollDuration.ToMilliseconds()); - Telemetry::AccumulateTimeDelta( - Telemetry::STS_POLL_CYCLE, - pollCycleStart + singlePollDuration, - TimeStamp::NowLoRes()); - pollDuration += singlePollDuration; - } - mRawThread->HasPendingEvents(&pendingEvents); if (pendingEvents) { if (!mServingPendingQueue) { @@ -940,22 +929,6 @@ nsSocketTransportService::Run() ((TimeStamp::NowLoRes() - eventQueueStart).ToMilliseconds() < mMaxTimePerPollIter)); - - if (mTelemetryEnabledPref && !mServingPendingQueue && - !startOfIteration.IsNull()) { - Telemetry::AccumulateTimeDelta( - Telemetry::STS_POLL_AND_EVENTS_CYCLE, - startOfIteration + pollDuration, - TimeStamp::NowLoRes()); - - Telemetry::Accumulate( - Telemetry::STS_NUMBER_OF_PENDING_EVENTS, - numberOfPendingEvents); - - numberOfPendingEventsLastCycle += numberOfPendingEvents; - numberOfPendingEvents = 0; - pollDuration = 0; - } } } while (pendingEvents); @@ -964,16 +937,6 @@ nsSocketTransportService::Run() { MutexAutoLock lock(mLock); if (mShuttingDown) { - if (mTelemetryEnabledPref && - !startOfCycleForLastCycleCalc.IsNull()) { - Telemetry::Accumulate( - Telemetry::STS_NUMBER_OF_PENDING_EVENTS_IN_THE_LAST_CYCLE, - numberOfPendingEventsLastCycle); - Telemetry::AccumulateTimeDelta( - Telemetry::STS_POLL_AND_EVENT_THE_LAST_CYCLE, - startOfCycleForLastCycleCalc, - TimeStamp::NowLoRes()); - } break; } if (mGoingOffline) { @@ -1142,11 +1105,6 @@ nsSocketTransportService::DoPollIteration(TimeDuration *pollDuration) } } } - if (mTelemetryEnabledPref) { - Telemetry::Accumulate( - Telemetry::STS_NUMBER_OF_ONSOCKETREADY_CALLS, - numberOfOnSocketReadyCalls); - } // // check for "dead" sockets and remove them (need to do this in @@ -1465,7 +1423,6 @@ nsSocketTransportService::ProbeMaxCount() if (pfd[index].fd) PR_Close(pfd[index].fd); - Telemetry::Accumulate(Telemetry::NETWORK_PROBE_MAXCOUNT, gMaxCount); SOCKET_LOG(("Socket Limit Test max was confirmed at %d\n", gMaxCount)); } #endif // windows diff --git a/netwerk/base/nsUDPSocket.cpp b/netwerk/base/nsUDPSocket.cpp index 5973a205d4..24f3954cb5 100644 --- a/netwerk/base/nsUDPSocket.cpp +++ b/netwerk/base/nsUDPSocket.cpp @@ -777,33 +777,6 @@ nsUDPSocket::CloseSocket() } PR_Close(mFD); - - if (gSocketTransportService->IsTelemetryEnabledAndNotSleepPhase()) { - PRIntervalTime now = PR_IntervalNow(); - if (gIOService->IsNetTearingDown()) { - Telemetry::Accumulate(Telemetry::PRCLOSE_UDP_BLOCKING_TIME_SHUTDOWN, - PR_IntervalToMilliseconds(now - closeStarted)); - - } else if (PR_IntervalToSeconds(now - gIOService->LastConnectivityChange()) - < 60) { - Telemetry::Accumulate(Telemetry::PRCLOSE_UDP_BLOCKING_TIME_CONNECTIVITY_CHANGE, - PR_IntervalToMilliseconds(now - closeStarted)); - - } else if (PR_IntervalToSeconds(now - gIOService->LastNetworkLinkChange()) - < 60) { - Telemetry::Accumulate(Telemetry::PRCLOSE_UDP_BLOCKING_TIME_LINK_CHANGE, - PR_IntervalToMilliseconds(now - closeStarted)); - - } else if (PR_IntervalToSeconds(now - gIOService->LastOfflineStateChange()) - < 60) { - Telemetry::Accumulate(Telemetry::PRCLOSE_UDP_BLOCKING_TIME_OFFLINE, - PR_IntervalToMilliseconds(now - closeStarted)); - - } else { - Telemetry::Accumulate(Telemetry::PRCLOSE_UDP_BLOCKING_TIME_NORMAL, - PR_IntervalToMilliseconds(now - closeStarted)); - } - } } mFD = nullptr; } diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp index bab67e1040..7c977c09d4 100644 --- a/netwerk/cache/nsCacheService.cpp +++ b/netwerk/cache/nsCacheService.cpp @@ -2655,18 +2655,7 @@ nsCacheService::Lock(mozilla::Telemetry::ID mainThreadLockerID) generalID = mozilla::Telemetry::CACHE_SERVICE_LOCK_WAIT_2; } - TimeStamp start(TimeStamp::Now()); - nsCacheService::Lock(); - - TimeStamp stop(TimeStamp::Now()); - - // Telemetry isn't thread safe on its own, but this is OK because we're - // protecting it with the cache lock. - if (lockerID != mozilla::Telemetry::HistogramCount) { - mozilla::Telemetry::AccumulateTimeDelta(lockerID, start, stop); - } - mozilla::Telemetry::AccumulateTimeDelta(generalID, start, stop); } void diff --git a/netwerk/cache/nsDiskCacheMap.cpp b/netwerk/cache/nsDiskCacheMap.cpp index d7ce13a35a..d3ec1e714b 100644 --- a/netwerk/cache/nsDiskCacheMap.cpp +++ b/netwerk/cache/nsDiskCacheMap.cpp @@ -19,7 +19,6 @@ #include "mozilla/MemoryReporting.h" #include "mozilla/Sprintf.h" -#include "mozilla/Telemetry.h" #include <algorithm> using namespace mozilla; @@ -181,9 +180,6 @@ nsDiskCacheMap::Open(nsIFile * cacheDirectory, goto error_exit; } - Telemetry::Accumulate(Telemetry::HTTP_DISK_CACHE_OVERHEAD, - (uint32_t)SizeOfExcludingThis(moz_malloc_size_of)); - *corruptInfo = nsDiskCache::kNotCorrupt; return NS_OK; diff --git a/netwerk/cache2/CacheFile.cpp b/netwerk/cache2/CacheFile.cpp index fa0a893823..ce771c754c 100644 --- a/netwerk/cache2/CacheFile.cpp +++ b/netwerk/cache2/CacheFile.cpp @@ -14,7 +14,6 @@ #include <algorithm> #include "nsComponentManagerUtils.h" #include "nsProxyRelease.h" -#include "mozilla/Telemetry.h" // When CACHE_CHUNKS is defined we always cache unused chunks in mCacheChunks. // When it is not defined, we always release the chunks ASAP, i.e. we cache @@ -1914,9 +1913,6 @@ CacheFile::RemoveInput(CacheFileInputStream *aInput, nsresult aStatus) // chunks that won't be used anymore. CleanUpCachedChunks(); - Telemetry::Accumulate(Telemetry::NETWORK_CACHE_V2_INPUT_STREAM_STATUS, - StatusToTelemetryEnum(aStatus)); - return NS_OK; } @@ -1952,9 +1948,6 @@ CacheFile::RemoveOutput(CacheFileOutputStream *aOutput, nsresult aStatus) // Notify close listener as the last action aOutput->NotifyCloseListener(); - Telemetry::Accumulate(Telemetry::NETWORK_CACHE_V2_OUTPUT_STREAM_STATUS, - StatusToTelemetryEnum(aStatus)); - return NS_OK; } diff --git a/netwerk/cache2/CacheFileIOManager.cpp b/netwerk/cache2/CacheFileIOManager.cpp index 1d0d576355..98fdc24ac6 100644 --- a/netwerk/cache2/CacheFileIOManager.cpp +++ b/netwerk/cache2/CacheFileIOManager.cpp @@ -21,7 +21,6 @@ #include "nsIObserverService.h" #include "nsICacheStorageVisitor.h" #include "nsISizeOf.h" -#include "mozilla/Telemetry.h" #include "mozilla/DebugOnly.h" #include "mozilla/Services.h" #include "nsDirectoryServiceUtils.h" @@ -3861,7 +3860,6 @@ CacheFileIOManager::CreateCacheTree() } #endif - Telemetry::Accumulate(Telemetry::NETWORK_CACHE_FS_TYPE, fsType); CacheObserver::SetCacheFSReported(); } @@ -3917,8 +3915,6 @@ CacheFileIOManager::OpenNSPRHandle(CacheFileHandle *aHandle, bool aCreate) uint32_t cacheUsage; if (NS_SUCCEEDED(CacheIndex::GetCacheSize(&cacheUsage))) { cacheUsage >>= 10; - Telemetry::Accumulate(Telemetry::NETWORK_CACHE_SIZE_FULL_FAT, - cacheUsage); sSizeReported = true; } } diff --git a/netwerk/cache2/CacheFileMetadata.cpp b/netwerk/cache2/CacheFileMetadata.cpp index 3814b4c878..86fc089aaf 100644 --- a/netwerk/cache2/CacheFileMetadata.cpp +++ b/netwerk/cache2/CacheFileMetadata.cpp @@ -14,7 +14,6 @@ #include "nsICacheEntry.h" // for nsICacheEntryMetaDataVisitor #include "../cache/nsCacheUtils.h" #include "nsIFile.h" -#include "mozilla/Telemetry.h" #include "mozilla/DebugOnly.h" #include "prnetdb.h" @@ -687,16 +686,6 @@ CacheFileMetadata::OnDataRead(CacheFileHandle *aHandle, char *aBuf, return NS_OK; } - if (mFirstRead) { - Telemetry::AccumulateTimeDelta( - Telemetry::NETWORK_CACHE_METADATA_FIRST_READ_TIME_MS, mReadStart); - Telemetry::Accumulate( - Telemetry::NETWORK_CACHE_METADATA_FIRST_READ_SIZE, mBufSize); - } else { - Telemetry::AccumulateTimeDelta( - Telemetry::NETWORK_CACHE_METADATA_SECOND_READ_TIME_MS, mReadStart); - } - // check whether we have read all necessary data uint32_t realOffset = NetworkEndian::readUint32(mBuf + mBufSize - sizeof(uint32_t)); @@ -776,9 +765,6 @@ CacheFileMetadata::OnDataRead(CacheFileHandle *aHandle, char *aBuf, return NS_OK; } - Telemetry::Accumulate(Telemetry::NETWORK_CACHE_METADATA_SIZE, - size - realOffset); - // We have all data according to offset information at the end of the entry. // Try to parse it. rv = ParseMetadata(realOffset, realOffset - usedOffset, true); diff --git a/netwerk/cache2/CacheFileUtils.cpp b/netwerk/cache2/CacheFileUtils.cpp index d43e958bff..fe1a53b3d4 100644 --- a/netwerk/cache2/CacheFileUtils.cpp +++ b/netwerk/cache2/CacheFileUtils.cpp @@ -7,7 +7,6 @@ #include "CacheFileUtils.h" #include "LoadContextInfo.h" #include "mozilla/Tokenizer.h" -#include "mozilla/Telemetry.h" #include "nsCOMPtr.h" #include "nsAutoPtr.h" #include "nsString.h" @@ -474,19 +473,6 @@ DetailedCacheHitTelemetry::AddRecord(ERecType aType, TimeStamp aLoadStart) StaticMutexAutoLock lock(sLock); - if (aType == MISS) { - mozilla::Telemetry::AccumulateTimeDelta( - mozilla::Telemetry::NETWORK_CACHE_V2_MISS_TIME_MS, - aLoadStart); - } else { - mozilla::Telemetry::AccumulateTimeDelta( - mozilla::Telemetry::NETWORK_CACHE_V2_HIT_TIME_MS, - aLoadStart); - } - - Telemetry::Accumulate(Telemetry::NETWORK_CACHE_HIT_MISS_STAT_PER_CACHE_SIZE, - hitMissValue); - sHRStats[rangeIdx].AddRecord(aType); ++sRecordCnt; @@ -505,8 +491,6 @@ DetailedCacheHitTelemetry::AddRecord(ERecType aType, TimeStamp aLoadStart) uint32_t bucketOffset = sHRStats[i].GetHitRateBucket(kHitRateBuckets) * kNumOfRanges; - Telemetry::Accumulate(Telemetry::NETWORK_CACHE_HIT_RATE_PER_CACHE_SIZE, - bucketOffset + i); sHRStats[i].Reset(); } } diff --git a/netwerk/cache2/CacheFileUtils.h b/netwerk/cache2/CacheFileUtils.h index 3371c3eb56..13acfd71dc 100644 --- a/netwerk/cache2/CacheFileUtils.h +++ b/netwerk/cache2/CacheFileUtils.h @@ -138,7 +138,7 @@ private: // 10-%15%, ... static const uint32_t kHitRateBuckets = 20; - // Protects sRecordCnt, sHitStats and Telemetry::Accumulated() calls. + // Protects sRecordCnt and sHitStats calls. static StaticMutex sLock; // Counter of samples that is compared against kTotalSamplesReportLimit. diff --git a/netwerk/cache2/CacheIOThread.cpp b/netwerk/cache2/CacheIOThread.cpp index b96f03216c..d51f61b0f5 100644 --- a/netwerk/cache2/CacheIOThread.cpp +++ b/netwerk/cache2/CacheIOThread.cpp @@ -62,8 +62,6 @@ void CacheIOTelemetry::Report(uint32_t aLevel, CacheIOTelemetry::size_type aLeng // 10 is number of buckets we have in each probe aLength = std::min<size_type>(aLength, 10); - - Telemetry::Accumulate(telemetryID[aLevel], aLength - 1); // counted from 0 } } // anon diff --git a/netwerk/cache2/CacheIndex.cpp b/netwerk/cache2/CacheIndex.cpp index 4525bbe6d6..1009aeaf8a 100644 --- a/netwerk/cache2/CacheIndex.cpp +++ b/netwerk/cache2/CacheIndex.cpp @@ -3757,7 +3757,6 @@ ReportHashSizeMatch(const SHA1Sum::Hash *aHash1, const SHA1Sum::Hash *aHash2) bitsDiff++; uint8_t hashSizeMatch = debruijn32[bitsDiff*0x076be629>>27] + (i<<5); - Telemetry::Accumulate(Telemetry::NETWORK_CACHE_HASH_STATS, hashSizeMatch); return; } diff --git a/netwerk/cache2/CacheStorageService.cpp b/netwerk/cache2/CacheStorageService.cpp index 67ef4c5267..85f364e4e4 100644 --- a/netwerk/cache2/CacheStorageService.cpp +++ b/netwerk/cache2/CacheStorageService.cpp @@ -2084,8 +2084,6 @@ CacheStorageService::TelemetryRecordEntryCreation(CacheEntry const* entry) mPurgeTimeStamps.Remove(key); - Telemetry::AccumulateTimeDelta(Telemetry::HTTP_CACHE_ENTRY_RELOAD_TIME, - timeStamp, TimeStamp::NowLoRes()); } void @@ -2112,9 +2110,6 @@ CacheStorageService::TelemetryRecordEntryRemoval(CacheEntry const* entry) TelemetryPrune(now); mPurgeTimeStamps.Put(key, now); - Telemetry::Accumulate(Telemetry::HTTP_CACHE_ENTRY_REUSE_COUNT, entry->UseCount()); - Telemetry::AccumulateTimeDelta(Telemetry::HTTP_CACHE_ENTRY_ALIVE_TIME, - entry->LoadStart(), TimeStamp::NowLoRes()); } // nsIMemoryReporter diff --git a/netwerk/cache2/OldWrappers.cpp b/netwerk/cache2/OldWrappers.cpp index 81df88df0e..76a4fa6c19 100644 --- a/netwerk/cache2/OldWrappers.cpp +++ b/netwerk/cache2/OldWrappers.cpp @@ -21,7 +21,6 @@ #include "nsNetCID.h" #include "nsNetUtil.h" #include "nsProxyRelease.h" -#include "mozilla/Telemetry.h" static NS_DEFINE_CID(kStreamTransportServiceCID, NS_STREAMTRANSPORTSERVICE_CID); @@ -793,24 +792,6 @@ _OldCacheLoad::Run() return NS_OK; } - if (NS_SUCCEEDED(mStatus)) { - if (mFlags & nsICacheStorage::OPEN_TRUNCATE) { - mozilla::Telemetry::AccumulateTimeDelta( - mozilla::Telemetry::NETWORK_CACHE_V1_TRUNCATE_TIME_MS, - mLoadStart); - } - else if (mNew) { - mozilla::Telemetry::AccumulateTimeDelta( - mozilla::Telemetry::NETWORK_CACHE_V1_MISS_TIME_MS, - mLoadStart); - } - else { - mozilla::Telemetry::AccumulateTimeDelta( - mozilla::Telemetry::NETWORK_CACHE_V1_HIT_TIME_MS, - mLoadStart); - } - } - if (!(mFlags & CHECK_MULTITHREADED)) Check(); diff --git a/netwerk/cookie/nsCookieService.cpp b/netwerk/cookie/nsCookieService.cpp index 1c4e5e7409..52558107b5 100644 --- a/netwerk/cookie/nsCookieService.cpp +++ b/netwerk/cookie/nsCookieService.cpp @@ -3325,11 +3325,6 @@ nsCookieService::SetCookieInternal(nsIURI *aHostURI, // 3 = secure and "https:" bool isHTTPS; nsresult rv = aHostURI->SchemeIs("https", &isHTTPS); - if (NS_SUCCEEDED(rv)) { - Telemetry::Accumulate(Telemetry::COOKIE_SCHEME_SECURITY, - ((cookieAttributes.isSecure)? 0x02 : 0x00) | - ((isHTTPS)? 0x01 : 0x00)); - } int64_t currentTimeInUsec = PR_Now(); @@ -3480,8 +3475,6 @@ nsCookieService::AddInternal(const nsCookieKey &aKey, if (mLeaveSecureAlone && aCookie->IsSecure() && !isSecure) { COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader, "non-https cookie can't set secure flag"); - Telemetry::Accumulate(Telemetry::COOKIE_LEAVE_SECURE_ALONE, - BLOCKED_SECURE_SET_FROM_HTTP); return; } nsListIter exactIter; @@ -3502,14 +3495,7 @@ nsCookieService::AddInternal(const nsCookieKey &aKey, if (!isSecure) { COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader, "cookie can't save because older cookie is secure cookie but newer cookie is non-secure cookie"); - Telemetry::Accumulate(Telemetry::COOKIE_LEAVE_SECURE_ALONE, - BLOCKED_DOWNGRADE_SECURE); return; - } else { - // A secure site is allowed to downgrade a secure cookie - // but we want to measure anyway - Telemetry::Accumulate(Telemetry::COOKIE_LEAVE_SECURE_ALONE, - DOWNGRADE_SECURE_FROM_SECURE); } } } @@ -3609,8 +3595,6 @@ nsCookieService::AddInternal(const nsCookieKey &aKey, // It's valid to evict a secure cookie for another secure cookie. oldestCookieTime = FindStaleCookie(entry, currentTime, aHostURI, Some(true), iter); } else { - Telemetry::Accumulate(Telemetry::COOKIE_LEAVE_SECURE_ALONE, - EVICTING_SECURE_BLOCKED); COOKIE_LOGEVICTED(aCookie, "Too many cookies for this domain and the new cookie is not a secure cookie"); return; @@ -4651,19 +4635,7 @@ void nsCookieService::TelemetryForEvictingStaleCookie(nsCookie *aEvicted, int64_t oldestCookieTime) { - // We need to record the evicting cookie to telemetry. - if (!aEvicted->IsSecure()) { - if (aEvicted->LastAccessed() > oldestCookieTime) { - Telemetry::Accumulate(Telemetry::COOKIE_LEAVE_SECURE_ALONE, - EVICTED_NEWER_INSECURE); - } else { - Telemetry::Accumulate(Telemetry::COOKIE_LEAVE_SECURE_ALONE, - EVICTED_OLDEST_COOKIE); - } - } else { - Telemetry::Accumulate(Telemetry::COOKIE_LEAVE_SECURE_ALONE, - EVICTED_PREFERRED_COOKIE); - } + /* STUB */ } // count the number of cookies stored by a particular host. this is provided by the diff --git a/netwerk/dns/nsHostResolver.cpp b/netwerk/dns/nsHostResolver.cpp index f2e26cadd4..c4883ab299 100644 --- a/netwerk/dns/nsHostResolver.cpp +++ b/netwerk/dns/nsHostResolver.cpp @@ -225,7 +225,6 @@ nsHostRecord::CopyExpirationTimesAndFlagsFrom(const nsHostRecord *aFromHostRecor nsHostRecord::~nsHostRecord() { - Telemetry::Accumulate(Telemetry::DNS_BLACKLIST_COUNT, mBlacklistedCount); delete addr_info; delete addr; } @@ -775,7 +774,6 @@ nsHostResolver::ResolveHost(const char *host, LOG_HOST(host, netInterface))); // put reference to host record on stack... result = he->rec; - Telemetry::Accumulate(Telemetry::DNS_LOOKUP_METHOD2, METHOD_HIT); // For entries that are in the grace period // or all cached negative entries, use the cache but start a new @@ -785,8 +783,6 @@ nsHostResolver::ResolveHost(const char *host, if (he->rec->negative) { LOG((" Negative cache entry for host [%s%s%s].\n", LOG_HOST(host, netInterface))); - Telemetry::Accumulate(Telemetry::DNS_LOOKUP_METHOD2, - METHOD_NEGATIVE_HIT); status = NS_ERROR_UNKNOWN_HOST; } } @@ -794,8 +790,6 @@ nsHostResolver::ResolveHost(const char *host, // go ahead and use it. else if (he->rec->addr) { LOG((" Using cached address for IP Literal [%s].\n", host)); - Telemetry::Accumulate(Telemetry::DNS_LOOKUP_METHOD2, - METHOD_LITERAL); result = he->rec; } // try parsing the host name as an IP address literal to short @@ -808,8 +802,6 @@ nsHostResolver::ResolveHost(const char *host, he->rec->addr = new NetAddr(); PRNetAddrToNetAddr(&tempAddr, he->rec->addr); // put reference to host record on stack... - Telemetry::Accumulate(Telemetry::DNS_LOOKUP_METHOD2, - METHOD_LITERAL); result = he->rec; } else if (mPendingCount >= MAX_NON_PRIORITY_REQUESTS && @@ -819,8 +811,6 @@ nsHostResolver::ResolveHost(const char *host, "host [%s%s%s].\n", IsMediumPriority(flags) ? "medium" : "low", LOG_HOST(host, netInterface))); - Telemetry::Accumulate(Telemetry::DNS_LOOKUP_METHOD2, - METHOD_OVERFLOW); // This is a lower priority request and we are swamped, so refuse it. rv = NS_ERROR_DNS_LOOKUP_QUEUE_FULL; } @@ -885,8 +875,6 @@ nsHostResolver::ResolveHost(const char *host, if (he->rec->negative) { status = NS_ERROR_UNKNOWN_HOST; } - Telemetry::Accumulate(Telemetry::DNS_LOOKUP_METHOD2, - METHOD_HIT); ConditionallyRefreshRecord(he->rec, host); } // For AF_INET6, a new lookup means another AF_UNSPEC @@ -900,8 +888,6 @@ nsHostResolver::ResolveHost(const char *host, result = he->rec; he->rec->negative = true; status = NS_ERROR_UNKNOWN_HOST; - Telemetry::Accumulate(Telemetry::DNS_LOOKUP_METHOD2, - METHOD_NEGATIVE_HIT); } } } @@ -915,8 +901,6 @@ nsHostResolver::ResolveHost(const char *host, PR_APPEND_LINK(callback, &he->rec->callbacks); he->rec->flags = flags; rv = IssueLookup(he->rec); - Telemetry::Accumulate(Telemetry::DNS_LOOKUP_METHOD2, - METHOD_NETWORK_FIRST); if (NS_FAILED(rv)) { PR_REMOVE_AND_INIT_LINK(callback); } @@ -933,8 +917,6 @@ nsHostResolver::ResolveHost(const char *host, PR_APPEND_LINK(callback, &he->rec->callbacks); if (he->rec->onQueue) { - Telemetry::Accumulate(Telemetry::DNS_LOOKUP_METHOD2, - METHOD_NETWORK_SHARED); // Consider the case where we are on a pending queue of // lower priority than the request is being made at. @@ -1085,13 +1067,6 @@ nsHostResolver::ConditionallyRefreshRecord(nsHostRecord *rec, const char *host) LOG((" Using %s cache entry for host [%s] but starting async renewal.", rec->negative ? "negative" :"positive", host)); IssueLookup(rec); - - if (!rec->negative) { - // negative entries are constantly being refreshed, only - // track positive grace period induced renewals - Telemetry::Accumulate(Telemetry::DNS_LOOKUP_METHOD2, - METHOD_RENEWAL); - } } return NS_OK; } @@ -1326,13 +1301,6 @@ nsHostResolver::OnLookupComplete(nsHostRecord* rec, nsresult status, AddrInfo* n PR_REMOVE_AND_INIT_LINK(head); mDB.Remove((nsHostKey *) head); - if (!head->negative) { - // record the age of the entry upon eviction. - TimeDuration age = TimeStamp::NowLoRes() - head->mValidStart; - Telemetry::Accumulate(Telemetry::DNS_CLEANUP_AGE, - static_cast<uint32_t>(age.ToSeconds() / 60)); - } - // release reference to rec owned by mEvictionQ NS_RELEASE(head); } @@ -1467,32 +1435,6 @@ nsHostResolver::ThreadFunc(void *arg) } #endif - { // obtain lock to check shutdown and manage inter-module telemetry - MutexAutoLock lock(resolver->mLock); - - if (!resolver->mShutdown) { - TimeDuration elapsed = TimeStamp::Now() - startTime; - uint32_t millis = static_cast<uint32_t>(elapsed.ToMilliseconds()); - - if (NS_SUCCEEDED(status)) { - Telemetry::ID histogramID; - if (!rec->addr_info_gencnt) { - // Time for initial lookup. - histogramID = Telemetry::DNS_LOOKUP_TIME; - } else if (!getTtl) { - // Time for renewal; categorized by expiration strategy. - histogramID = Telemetry::DNS_RENEWAL_TIME; - } else { - // Time to get TTL; categorized by expiration strategy. - histogramID = Telemetry::DNS_RENEWAL_TIME_FOR_TTL; - } - Telemetry::Accumulate(histogramID, millis); - } else { - Telemetry::Accumulate(Telemetry::DNS_FAILED_LOOKUP_TIME, millis); - } - } - } - // OnLookupComplete may release "rec", long before we lose it. LOG(("DNS lookup thread - lookup completed for host [%s%s%s]: %s.\n", LOG_HOST(rec->host, rec->netInterface), diff --git a/netwerk/protocol/http/ASpdySession.cpp b/netwerk/protocol/http/ASpdySession.cpp index f22c326d1a..d5d98804d0 100644 --- a/netwerk/protocol/http/ASpdySession.cpp +++ b/netwerk/protocol/http/ASpdySession.cpp @@ -45,8 +45,6 @@ ASpdySession::NewSpdySession(uint32_t version, // from a list provided in the SERVER HELLO filtered by our acceptable // versions, so there is no risk of the server ignoring our prefs. - Telemetry::Accumulate(Telemetry::SPDY_VERSION2, version); - return new Http2Session(aTransport, version, attemptingEarlyData); } diff --git a/netwerk/protocol/http/Http2Compression.cpp b/netwerk/protocol/http/Http2Compression.cpp index 1b4603e1af..64fd05a170 100644 --- a/netwerk/protocol/http/Http2Compression.cpp +++ b/netwerk/protocol/http/Http2Compression.cpp @@ -292,12 +292,6 @@ Http2BaseCompressor::Http2BaseCompressor() Http2BaseCompressor::~Http2BaseCompressor() { - if (mPeakSize) { - Telemetry::Accumulate(mPeakSizeID, mPeakSize); - } - if (mPeakCount) { - Telemetry::Accumulate(mPeakCountID, mPeakCount); - } UnregisterStrongMemoryReporter(mDynamicReporter); mDynamicReporter->mCompressor = nullptr; mDynamicReporter = nullptr; @@ -336,16 +330,6 @@ Http2BaseCompressor::MakeRoom(uint32_t amount, const char *direction) bytesEvicted += mHeaderTable[index]->Size(); mHeaderTable.RemoveElement(); } - - if (!strcmp(direction, "decompressor")) { - Telemetry::Accumulate(Telemetry::HPACK_ELEMENTS_EVICTED_DECOMPRESSOR, countEvicted); - Telemetry::Accumulate(Telemetry::HPACK_BYTES_EVICTED_DECOMPRESSOR, bytesEvicted); - Telemetry::Accumulate(Telemetry::HPACK_BYTES_EVICTED_RATIO_DECOMPRESSOR, (uint32_t)((100.0 * (double)bytesEvicted) / (double)amount)); - } else { - Telemetry::Accumulate(Telemetry::HPACK_ELEMENTS_EVICTED_COMPRESSOR, countEvicted); - Telemetry::Accumulate(Telemetry::HPACK_BYTES_EVICTED_COMPRESSOR, bytesEvicted); - Telemetry::Accumulate(Telemetry::HPACK_BYTES_EVICTED_RATIO_COMPRESSOR, (uint32_t)((100.0 * (double)bytesEvicted) / (double)amount)); - } } void diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp index 4f350af83b..4a178f0910 100644 --- a/netwerk/protocol/http/Http2Session.cpp +++ b/netwerk/protocol/http/Http2Session.cpp @@ -168,13 +168,6 @@ Http2Session::~Http2Session() this, mDownstreamState)); Shutdown(); - - Telemetry::Accumulate(Telemetry::SPDY_PARALLEL_STREAMS, mConcurrentHighWater); - Telemetry::Accumulate(Telemetry::SPDY_REQUEST_PER_CONN, (mNextStreamID - 1) / 2); - Telemetry::Accumulate(Telemetry::SPDY_SERVER_INITIATED_STREAMS, - mServerPushedResources); - Telemetry::Accumulate(Telemetry::SPDY_GOAWAY_LOCAL, mClientGoAwayReason); - Telemetry::Accumulate(Telemetry::SPDY_GOAWAY_PEER, mPeerGoAwayReason); } void @@ -1508,13 +1501,11 @@ Http2Session::RecvSettings(Http2Session *self) case SETTINGS_TYPE_MAX_CONCURRENT: self->mMaxConcurrent = value; - Telemetry::Accumulate(Telemetry::SPDY_SETTINGS_MAX_STREAMS, value); self->ProcessPending(); break; case SETTINGS_TYPE_INITIAL_WINDOW: { - Telemetry::Accumulate(Telemetry::SPDY_SETTINGS_IW, value >> 10); int32_t delta = value - self->mServerInitialStreamWindow; self->mServerInitialStreamWindow = value; @@ -2494,8 +2485,6 @@ Http2Session::ReadyToProcessDataFrame(enum internalStateType newState) newState == DISCARDING_DATA_FRAME_PADDING); ChangeDownstreamState(newState); - Telemetry::Accumulate(Telemetry::SPDY_CHUNK_RECVD, - mInputFrameDataSize >> 10); mLastDataReadEpoch = mLastReadEpoch; if (!mInputFrameID) { diff --git a/netwerk/protocol/http/Http2Stream.cpp b/netwerk/protocol/http/Http2Stream.cpp index 7a8f968550..3471985dd4 100644 --- a/netwerk/protocol/http/Http2Stream.cpp +++ b/netwerk/protocol/http/Http2Stream.cpp @@ -21,7 +21,6 @@ #include "Http2Push.h" #include "TunnelUtils.h" -#include "mozilla/Telemetry.h" #include "nsAlgorithm.h" #include "nsHttp.h" #include "nsHttpHandler.h" @@ -658,8 +657,6 @@ Http2Stream::GenerateOpen() outputOffset += frameLen; } - Telemetry::Accumulate(Telemetry::SPDY_SYN_SIZE, compressedData.Length()); - // The size of the input headers is approximate uint32_t ratio = compressedData.Length() * 100 / @@ -667,7 +664,6 @@ Http2Stream::GenerateOpen() mFlatHttpRequestHeaders.Length()); mFlatHttpRequestHeaders.Truncate(); - Telemetry::Accumulate(Telemetry::SPDY_SYN_RATIO, ratio); return NS_OK; } @@ -1025,13 +1021,6 @@ Http2Stream::ConvertResponseHeaders(Http2Decompressor *decompressor, return NS_ERROR_ILLEGAL_VALUE; } - if (aHeadersIn.Length() && aHeadersOut.Length()) { - Telemetry::Accumulate(Telemetry::SPDY_SYN_REPLY_SIZE, aHeadersIn.Length()); - uint32_t ratio = - aHeadersIn.Length() * 100 / aHeadersOut.Length(); - Telemetry::Accumulate(Telemetry::SPDY_SYN_REPLY_RATIO, ratio); - } - // The decoding went ok. Now we can customize and clean up. aHeadersIn.Truncate(); diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp index d161f9a432..c4e764d26d 100644 --- a/netwerk/protocol/http/HttpBaseChannel.cpp +++ b/netwerk/protocol/http/HttpBaseChannel.cpp @@ -49,7 +49,6 @@ #include "LoadInfo.h" #include "nsNullPrincipal.h" #include "nsISSLSocketControl.h" -#include "mozilla/Telemetry.h" #include "nsIURL.h" #include "nsIConsoleService.h" #include "mozilla/BinarySearch.h" @@ -1006,7 +1005,6 @@ HttpBaseChannel::DoApplyContentConversions(nsIStreamListener* aNextListener, } else if (from.Equals("br")) { mode = 3; } - Telemetry::Accumulate(Telemetry::HTTP_CONTENT_ENCODING, mode); } nextListener = converter; } diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index d7247eeab8..bb0b3ca774 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -133,18 +133,7 @@ enum CacheDisposition { void AccumulateCacheHitTelemetry(CacheDisposition hitOrMiss) { - if (!CacheObserver::UseNewCache()) { - Telemetry::Accumulate(Telemetry::HTTP_CACHE_DISPOSITION_2, hitOrMiss); - } - else { - Telemetry::Accumulate(Telemetry::HTTP_CACHE_DISPOSITION_2_V2, hitOrMiss); - - int32_t experiment = CacheObserver::HalfLifeExperiment(); - if (experiment > 0 && hitOrMiss == kCacheMissed) { - Telemetry::Accumulate(Telemetry::HTTP_CACHE_MISS_HALFLIFE_EXPERIMENT_2, - experiment - 1); - } - } + /* STUB */ } // Computes and returns a SHA1 hash of the input buffer. The input buffer @@ -1141,26 +1130,21 @@ EnsureMIMEOfScript(nsIURI* aURI, nsHttpResponseHead* aResponseHead, nsILoadInfo* if (nsContentUtils::IsJavascriptMIMEType(typeString)) { // script load has type script - Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 1); return NS_OK; } bool block = false; if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("image/"))) { // script load has type image - Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 2); block = true; } else if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("audio/"))) { // script load has type audio - Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 3); block = true; } else if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("video/"))) { // script load has type video - Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 4); block = true; } else if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("text/csv"))) { // script load has type text/csv - Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 6); block = true; } @@ -1186,42 +1170,35 @@ EnsureMIMEOfScript(nsIURI* aURI, nsHttpResponseHead* aResponseHead, nsILoadInfo* if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("text/plain"))) { // script load has type text/plain - Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 5); return NS_OK; } if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("text/xml"))) { // script load has type text/xml - Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 7); return NS_OK; } if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("application/octet-stream"))) { // script load has type application/octet-stream - Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 8); return NS_OK; } if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("application/xml"))) { // script load has type application/xml - Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 9); return NS_OK; } if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("text/html"))) { // script load has type text/html - Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 10); return NS_OK; } if (contentType.IsEmpty()) { // script load has no type - Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 11); return NS_OK; } // script load has unknown type - Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 0); return NS_OK; } @@ -1867,65 +1844,6 @@ nsHttpChannel::ProcessResponse() LOG(("nsHttpChannel::ProcessResponse [this=%p httpStatus=%u]\n", this, httpStatus)); - // do some telemetry - if (gHttpHandler->IsTelemetryEnabled()) { - // Gather data on whether the transaction and page (if this is - // the initial page load) is being loaded with SSL. - Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_IS_SSL, - mConnectionInfo->EndToEndSSL()); - if (mLoadFlags & LOAD_INITIAL_DOCUMENT_URI) { - Telemetry::Accumulate(Telemetry::HTTP_PAGELOAD_IS_SSL, - mConnectionInfo->EndToEndSSL()); - } - - // how often do we see something like Alternate-Protocol: "443:quic,p=1" - nsAutoCString alt_protocol; - mResponseHead->GetHeader(nsHttp::Alternate_Protocol, alt_protocol); - bool saw_quic = (!alt_protocol.IsEmpty() && - PL_strstr(alt_protocol.get(), "quic")) ? 1 : 0; - Telemetry::Accumulate(Telemetry::HTTP_SAW_QUIC_ALT_PROTOCOL, saw_quic); - - // Gather data on how many URLS get redirected - switch (httpStatus) { - case 200: - Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 0); - break; - case 301: - Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 1); - break; - case 302: - Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 2); - break; - case 304: - Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 3); - break; - case 307: - Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 4); - break; - case 308: - Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 5); - break; - case 400: - Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 6); - break; - case 401: - Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 7); - break; - case 403: - Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 8); - break; - case 404: - Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 9); - break; - case 500: - Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 10); - break; - default: - Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 11); - break; - } - } - // Let the predictor know whether this was a cacheable response or not so // that it knows whether or not to possibly prefetch this resource in the // future. @@ -2204,9 +2122,6 @@ nsHttpChannel::ContinueProcessResponse2(nsresult rv) } AccumulateCacheHitTelemetry(cacheDisposition); - Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_VERSION, - mResponseHead->Version()); - if (mResponseHead->Version() == NS_HTTP_VERSION_0_9) { // DefaultPortTopLevel = 0, DefaultPortSubResource = 1, // NonDefaultPortTopLevel = 2, NonDefaultPortSubResource = 3 @@ -2217,7 +2132,6 @@ nsHttpChannel::ContinueProcessResponse2(nsresult rv) if (mConnectionInfo->OriginPort() != mConnectionInfo->DefaultPort()) { v09Info += 2; } - Telemetry::Accumulate(Telemetry::HTTP_09_INFO, v09Info); } } return rv; @@ -3212,7 +3126,6 @@ nsHttpChannel::ProcessNotModified() PipelineFeedbackInfo(mConnectionInfo, nsHttpConnectionMgr::RedCorruptedContent, nullptr, 0); - Telemetry::Accumulate(Telemetry::CACHE_LM_INCONSISTENT, true); } // merge any new headers with the cached response headers @@ -4222,11 +4135,6 @@ nsHttpChannel::OnNormalCacheEntryAvailable(nsICacheEntry *aEntry, if (NS_SUCCEEDED(aEntryStatus)) { mCacheEntry = aEntry; mCacheEntryIsWriteOnly = aNew; - - if (mLoadFlags & LOAD_INITIAL_DOCUMENT_URI) { - Telemetry::Accumulate(Telemetry::HTTP_OFFLINE_CACHE_DOCUMENT_LOAD, - false); - } } return NS_OK; @@ -5897,17 +5805,13 @@ nsHttpChannel::BeginConnect() LOG(("nsHttpChannel %p Using connection info from altsvc mapping", this)); mapping->GetConnectionInfo(getter_AddRefs(mConnectionInfo), proxyInfo, originAttributes); - Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_USE_ALTSVC, true); - Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_USE_ALTSVC_OE, !isHttps); } else if (mConnectionInfo) { LOG(("nsHttpChannel %p Using channel supplied connection info", this)); - Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_USE_ALTSVC, false); } else { LOG(("nsHttpChannel %p Using default connection info", this)); mConnectionInfo = new nsHttpConnectionInfo(host, port, EmptyCString(), mUsername, proxyInfo, originAttributes, isHttps); - Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_USE_ALTSVC, false); } // Set network interface id only when it's not empty to avoid @@ -6829,7 +6733,6 @@ nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult st chanDisposition = static_cast<ChannelDisposition>(chanDisposition + kHttpsCanceled); } LOG((" nsHttpChannel::OnStopRequest ChannelDisposition %d\n", chanDisposition)); - Telemetry::Accumulate(Telemetry::HTTP_CHANNEL_DISPOSITION, chanDisposition); // if needed, check cache entry has all data we expect if (mCacheEntry && mCachePump && @@ -8200,129 +8103,7 @@ nsHttpChannel::SetDoNotTrack() void nsHttpChannel::ReportNetVSCacheTelemetry() { - nsresult rv; - if (!mCacheEntry) { - return; - } - - // We only report telemetry if the entry is persistent (on disk) - bool persistent; - rv = mCacheEntry->GetPersistent(&persistent); - if (NS_FAILED(rv) || !persistent) { - return; - } - - nsXPIDLCString tmpStr; - rv = mCacheEntry->GetMetaDataElement("net-response-time-onstart", - getter_Copies(tmpStr)); - if (NS_FAILED(rv)) { - return; - } - uint64_t onStartNetTime = tmpStr.ToInteger64(&rv); - if (NS_FAILED(rv)) { - return; - } - - tmpStr.Truncate(); - rv = mCacheEntry->GetMetaDataElement("net-response-time-onstop", - getter_Copies(tmpStr)); - if (NS_FAILED(rv)) { - return; - } - uint64_t onStopNetTime = tmpStr.ToInteger64(&rv); - if (NS_FAILED(rv)) { - return; - } - - uint64_t onStartCacheTime = (mOnStartRequestTimestamp - mAsyncOpenTime).ToMilliseconds(); - int64_t onStartDiff = onStartNetTime - onStartCacheTime; - onStartDiff += 500; // We offset the difference by 500 ms to report positive values in telemetry - - uint64_t onStopCacheTime = (mCacheReadEnd - mAsyncOpenTime).ToMilliseconds(); - int64_t onStopDiff = onStopNetTime - onStopCacheTime; - onStopDiff += 500; // We offset the difference by 500 ms - - if (mDidReval) { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_REVALIDATED, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_REVALIDATED, onStopDiff); - } else { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_NOTREVALIDATED, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_NOTREVALIDATED, onStopDiff); - } - - if (mDidReval) { - // We don't report revalidated probes as the data would be skewed. - return; - } - - uint32_t diskStorageSizeK = 0; - rv = mCacheEntry->GetDiskStorageSizeInKB(&diskStorageSizeK); - if (NS_FAILED(rv)) { - return; - } - - nsAutoCString contentType; - if (mResponseHead && mResponseHead->HasContentType()) { - mResponseHead->ContentType(contentType); - } - bool isImage = StringBeginsWith(contentType, NS_LITERAL_CSTRING("image/")); - if (isImage) { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_ISIMG, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_ISIMG, onStopDiff); - } else { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_NOTIMG, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_NOTIMG, onStopDiff); - } - - if (mCacheOpenWithPriority) { - if (mCacheQueueSizeWhenOpen < 5) { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_QSMALL_HIGHPRI, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_QSMALL_HIGHPRI, onStopDiff); - } else if (mCacheQueueSizeWhenOpen < 10) { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_QMED_HIGHPRI, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_QMED_HIGHPRI, onStopDiff); - } else { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_QBIG_HIGHPRI, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_QBIG_HIGHPRI, onStopDiff); - } - } else { // The limits are higher for normal priority cache queues - if (mCacheQueueSizeWhenOpen < 10) { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_QSMALL_NORMALPRI, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_QSMALL_NORMALPRI, onStopDiff); - } else if (mCacheQueueSizeWhenOpen < 50) { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_QMED_NORMALPRI, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_QMED_NORMALPRI, onStopDiff); - } else { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_QBIG_NORMALPRI, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_QBIG_NORMALPRI, onStopDiff); - } - } - - if (diskStorageSizeK < 32) { - if (mCacheOpenWithPriority) { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_SMALL_HIGHPRI, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_SMALL_HIGHPRI, onStopDiff); - } else { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_SMALL_NORMALPRI, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_SMALL_NORMALPRI, onStopDiff); - } - } else if (diskStorageSizeK < 256) { - if (mCacheOpenWithPriority) { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_MED_HIGHPRI, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_MED_HIGHPRI, onStopDiff); - } else { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_MED_NORMALPRI, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_MED_NORMALPRI, onStopDiff); - } - } else { - if (mCacheOpenWithPriority) { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_LARGE_HIGHPRI, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_LARGE_HIGHPRI, onStopDiff); - } else { - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_LARGE_NORMALPRI, onStartDiff); - Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_LARGE_NORMALPRI, onStopDiff); - } - } + /* STUB */ } } // namespace net diff --git a/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp b/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp index d04f47ddc8..0e7eb55c3b 100644 --- a/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp +++ b/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp @@ -867,24 +867,6 @@ nsHttpChannelAuthProvider::GetCredentialsForChallenge(const char *challenge, else if (authFlags & nsIHttpAuthenticator::IDENTITY_ENCRYPTED) level = nsIAuthPrompt2::LEVEL_PW_ENCRYPTED; - // Collect statistics on how frequently the various types of HTTP - // authentication are used over SSL and non-SSL connections. - if (gHttpHandler->IsTelemetryEnabled()) { - if (NS_LITERAL_CSTRING("basic").LowerCaseEqualsASCII(authType)) { - Telemetry::Accumulate(Telemetry::HTTP_AUTH_TYPE_STATS, - UsingSSL() ? HTTP_AUTH_BASIC_SECURE : HTTP_AUTH_BASIC_INSECURE); - } else if (NS_LITERAL_CSTRING("digest").LowerCaseEqualsASCII(authType)) { - Telemetry::Accumulate(Telemetry::HTTP_AUTH_TYPE_STATS, - UsingSSL() ? HTTP_AUTH_DIGEST_SECURE : HTTP_AUTH_DIGEST_INSECURE); - } else if (NS_LITERAL_CSTRING("ntlm").LowerCaseEqualsASCII(authType)) { - Telemetry::Accumulate(Telemetry::HTTP_AUTH_TYPE_STATS, - UsingSSL() ? HTTP_AUTH_NTLM_SECURE : HTTP_AUTH_NTLM_INSECURE); - } else if (NS_LITERAL_CSTRING("negotiate").LowerCaseEqualsASCII(authType)) { - Telemetry::Accumulate(Telemetry::HTTP_AUTH_TYPE_STATS, - UsingSSL() ? HTTP_AUTH_NEGOTIATE_SECURE : HTTP_AUTH_NEGOTIATE_INSECURE); - } - } - // Depending on the pref setting, the authentication dialog may be // blocked for all sub-resources, blocked for cross-origin // sub-resources, or always allowed for sub-resources. @@ -991,22 +973,6 @@ nsHttpChannelAuthProvider::BlockPrompt() } } - if (gHttpHandler->IsTelemetryEnabled()) { - if (topDoc) { - Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS, - HTTP_AUTH_DIALOG_TOP_LEVEL_DOC); - } else if (xhr) { - Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS, - HTTP_AUTH_DIALOG_XHR); - } else if (!mCrossOrigin) { - Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS, - HTTP_AUTH_DIALOG_SAME_ORIGIN_SUBRESOURCE); - } else { - Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS, - HTTP_AUTH_DIALOG_CROSS_ORIGIN_SUBRESOURCE); - } - } - switch (sAuthAllowPref) { case SUBRESOURCE_AUTH_DIALOG_DISALLOW_ALL: // Do not open the http-authentication credentials dialog for diff --git a/netwerk/protocol/http/nsHttpConnection.cpp b/netwerk/protocol/http/nsHttpConnection.cpp index c4564cd8bc..8ccba76e2c 100644 --- a/netwerk/protocol/http/nsHttpConnection.cpp +++ b/netwerk/protocol/http/nsHttpConnection.cpp @@ -19,7 +19,6 @@ #include "ASpdySession.h" #include "mozilla/ChaosMode.h" -#include "mozilla/Telemetry.h" #include "nsHttpConnection.h" #include "nsHttpHandler.h" #include "nsHttpPipeline.h" @@ -105,18 +104,12 @@ nsHttpConnection::~nsHttpConnection() if (!mEverUsedSpdy) { LOG(("nsHttpConnection %p performed %d HTTP/1.x transactions\n", this, mHttp1xTransactionCount)); - Telemetry::Accumulate(Telemetry::HTTP_REQUEST_PER_CONN, - mHttp1xTransactionCount); } if (mTotalBytesRead) { uint32_t totalKBRead = static_cast<uint32_t>(mTotalBytesRead >> 10); LOG(("nsHttpConnection %p read %dkb on connection spdy=%d\n", this, totalKBRead, mEverUsedSpdy)); - Telemetry::Accumulate(mEverUsedSpdy ? - Telemetry::SPDY_KBREAD_PER_CONN : - Telemetry::HTTP_KBREAD_PER_CONN, - totalKBRead); } if (mForceSendTimer) { mForceSendTimer->Cancel(); @@ -482,21 +475,6 @@ nsHttpConnection::EnsureNPNComplete(nsresult &aOut0RTTWriteHandshakeValue, int16_t tlsVersion; ssl->GetSSLVersionUsed(&tlsVersion); - // Send the 0RTT telemetry only for tls1.3 - if (tlsVersion > nsISSLSocketControl::TLS_VERSION_1_2) { - Telemetry::Accumulate(Telemetry::TLS_EARLY_DATA_NEGOTIATED, - (!mEarlyDataNegotiated) ? TLS_EARLY_DATA_NOT_AVAILABLE - : ((mWaitingFor0RTTResponse) ? TLS_EARLY_DATA_AVAILABLE_AND_USED - : TLS_EARLY_DATA_AVAILABLE_BUT_NOT_USED)); - if (mWaitingFor0RTTResponse) { - Telemetry::Accumulate(Telemetry::TLS_EARLY_DATA_ACCEPTED, - earlyDataAccepted); - } - if (earlyDataAccepted) { - Telemetry::Accumulate(Telemetry::TLS_EARLY_DATA_BYTES_WRITTEN, - mContentBytesWritten0RTT); - } - } mWaitingFor0RTTResponse = false; if (!earlyDataAccepted) { @@ -518,8 +496,6 @@ nsHttpConnection::EnsureNPNComplete(nsresult &aOut0RTTWriteHandshakeValue, StartSpdy(mSpdySession->SpdyVersion()); } } - - Telemetry::Accumulate(Telemetry::SPDY_NPN_CONNECT, UsingSpdy()); } npnComplete: diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp b/netwerk/protocol/http/nsHttpConnectionMgr.cpp index 9271b49af4..731cdff394 100644 --- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp +++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp @@ -23,7 +23,6 @@ #include "mozilla/net/DNS.h" #include "nsISocketTransport.h" #include "nsISSLSocketControl.h" -#include "mozilla/Telemetry.h" #include "mozilla/net/DashboardTypes.h" #include "NullHttpTransaction.h" #include "nsIDNSRecord.h" @@ -847,7 +846,6 @@ nsHttpConnectionMgr::GetSpdyPreferredEnt(nsConnectionEntry *aOriginalEntry) "with %s connections. rv=%x isJoined=%d", preferred->mConnInfo->Origin(), aOriginalEntry->mConnInfo->Origin(), rv, isJoined)); - Telemetry::Accumulate(Telemetry::SPDY_NPN_JOIN, false); return nullptr; } @@ -857,7 +855,6 @@ nsHttpConnectionMgr::GetSpdyPreferredEnt(nsConnectionEntry *aOriginalEntry) "so %s will be coalesced with %s", preferred->mConnInfo->Origin(), aOriginalEntry->mConnInfo->Origin(), aOriginalEntry->mConnInfo->Origin(), preferred->mConnInfo->Origin())); - Telemetry::Accumulate(Telemetry::SPDY_NPN_JOIN, true); return preferred; } @@ -1835,16 +1832,7 @@ nsHttpConnectionMgr::BuildPipeline(nsConnectionEntry *ent, void nsHttpConnectionMgr::ReportProxyTelemetry(nsConnectionEntry *ent) { - enum { PROXY_NONE = 1, PROXY_HTTP = 2, PROXY_SOCKS = 3, PROXY_HTTPS = 4 }; - - if (!ent->mConnInfo->UsingProxy()) - Telemetry::Accumulate(Telemetry::HTTP_PROXY_TYPE, PROXY_NONE); - else if (ent->mConnInfo->UsingHttpsProxy()) - Telemetry::Accumulate(Telemetry::HTTP_PROXY_TYPE, PROXY_HTTPS); - else if (ent->mConnInfo->UsingHttpProxy()) - Telemetry::Accumulate(Telemetry::HTTP_PROXY_TYPE, PROXY_HTTP); - else - Telemetry::Accumulate(Telemetry::HTTP_PROXY_TYPE, PROXY_SOCKS); + /* STUB */ } nsresult @@ -3107,8 +3095,6 @@ nsHalfOpenSocket::SetupStreams(nsISocketTransport **transport, rv = socketTransport->SetSecurityCallbacks(this); NS_ENSURE_SUCCESS(rv, rv); - Telemetry::Accumulate(Telemetry::HTTP_CONNECTION_ENTRY_CACHE_HIT_1, - mEnt->mUsedForConnection); mEnt->mUsedForConnection = true; nsCOMPtr<nsIOutputStream> sout; diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index 89f09190d5..6d58a7004e 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -58,7 +58,6 @@ #include "mozilla/net/NeckoChild.h" #include "mozilla/net/NeckoParent.h" #include "mozilla/ipc/URIUtils.h" -#include "mozilla/Telemetry.h" #include "mozilla/Unused.h" #include "mozilla/BasePrincipal.h" @@ -2182,11 +2181,6 @@ nsHttpHandler::Observe(nsISupports *subject, // depend on this value. mSessionStartTime = NowInSeconds(); - if (!mDoNotTrackEnabled) { - Telemetry::Accumulate(Telemetry::DNT_USAGE, 2); - } else { - Telemetry::Accumulate(Telemetry::DNT_USAGE, 1); - } } else if (!strcmp(topic, "profile-change-net-restore")) { // initialize connection manager InitConnectionMgr(); diff --git a/netwerk/protocol/websocket/WebSocketChannel.cpp b/netwerk/protocol/websocket/WebSocketChannel.cpp index c6dc8d3280..1bcdbcacca 100644 --- a/netwerk/protocol/websocket/WebSocketChannel.cpp +++ b/netwerk/protocol/websocket/WebSocketChannel.cpp @@ -55,7 +55,6 @@ #include "nsNetUtil.h" #include "nsINode.h" #include "mozilla/StaticMutex.h" -#include "mozilla/Telemetry.h" #include "mozilla/TimeStamp.h" #include "nsSocketTransportService2.h" @@ -2989,7 +2988,6 @@ WebSocketChannel::ReportConnectionTelemetry() (didProxy ? (1 << 0) : 0); LOG(("WebSocketChannel::ReportConnectionTelemetry() %p %d", this, value)); - Telemetry::Accumulate(Telemetry::WEBSOCKETS_HANDSHAKE_TYPE, value); } // nsIDNSListener diff --git a/netwerk/system/linux/nsNotifyAddrListener_Linux.cpp b/netwerk/system/linux/nsNotifyAddrListener_Linux.cpp index 4fc36928ac..b9f912d1d4 100644 --- a/netwerk/system/linux/nsNotifyAddrListener_Linux.cpp +++ b/netwerk/system/linux/nsNotifyAddrListener_Linux.cpp @@ -24,7 +24,6 @@ #include "mozilla/Services.h" #include "mozilla/SHA1.h" #include "mozilla/Sprintf.h" -#include "mozilla/Telemetry.h" /* a shorter name that better explains what it does */ #define EINTR_RETRY(x) MOZ_TEMP_FAILURE_RETRY(x) @@ -176,12 +175,10 @@ void nsNotifyAddrListener::calculateNetworkId(void) LOG(("networkid: id %s\n", output.get())); if (mNetworkId != output) { // new id - Telemetry::Accumulate(Telemetry::NETWORK_ID, 1); mNetworkId = output; } else { // same id - Telemetry::Accumulate(Telemetry::NETWORK_ID, 2); } found = true; break; @@ -195,7 +192,6 @@ void nsNotifyAddrListener::calculateNetworkId(void) } /* if (froute) */ if (!found) { // no id - Telemetry::Accumulate(Telemetry::NETWORK_ID, 0); } } diff --git a/netwerk/system/mac/nsNetworkLinkService.mm b/netwerk/system/mac/nsNetworkLinkService.mm index ac6a015fbe..5b2d7575ac 100644 --- a/netwerk/system/mac/nsNetworkLinkService.mm +++ b/netwerk/system/mac/nsNetworkLinkService.mm @@ -24,7 +24,6 @@ #include "mozilla/Preferences.h" #include "mozilla/SHA1.h" #include "mozilla/Base64.h" -#include "mozilla/Telemetry.h" #include "nsNetworkLinkService.h" #import <Cocoa/Cocoa.h> @@ -274,19 +273,16 @@ void nsNetworkLinkService::calculateNetworkId(void) LOG(("networkid: id %s\n", output.get())); if (mNetworkId != output) { // new id - Telemetry::Accumulate(Telemetry::NETWORK_ID, 1); mNetworkId = output; } else { // same id - Telemetry::Accumulate(Telemetry::NETWORK_ID, 2); } found = true; } } if (!found) { // no id - Telemetry::Accumulate(Telemetry::NETWORK_ID, 0); } } diff --git a/netwerk/system/win32/nsNotifyAddrListener.cpp b/netwerk/system/win32/nsNotifyAddrListener.cpp index 5d1ec3a61f..58f4345ef8 100644 --- a/netwerk/system/win32/nsNotifyAddrListener.cpp +++ b/netwerk/system/win32/nsNotifyAddrListener.cpp @@ -35,7 +35,6 @@ #include "mozilla/Preferences.h" #include "mozilla/SHA1.h" #include "mozilla/Base64.h" -#include "mozilla/Telemetry.h" #include <iptypes.h> #include <iphlpapi.h> @@ -218,12 +217,10 @@ bool nsNotifyAddrListener::findMac(char *gateway) LOG(("networkid: id %s\n", output.get())); if (mNetworkId != output) { // new id - Telemetry::Accumulate(Telemetry::NETWORK_ID, 1); mNetworkId = output; } else { // same id - Telemetry::Accumulate(Telemetry::NETWORK_ID, 2); } found = true; break; @@ -290,7 +287,6 @@ void nsNotifyAddrListener::calculateNetworkId(void) } if (!found) { // no id - Telemetry::Accumulate(Telemetry::NETWORK_ID, 0); } } diff --git a/security/manager/ssl/DataStorage.cpp b/security/manager/ssl/DataStorage.cpp index 2d9dbf5c43..c765fed00a 100644 --- a/security/manager/ssl/DataStorage.cpp +++ b/security/manager/ssl/DataStorage.cpp @@ -276,9 +276,6 @@ DataStorage::Reader::Run() } } } while (true); - - Telemetry::Accumulate(Telemetry::DATA_STORAGE_ENTRIES, - mDataStorage->mPersistentDataTable.Count()); } return NS_OK; diff --git a/security/manager/ssl/SSLServerCertVerification.cpp b/security/manager/ssl/SSLServerCertVerification.cpp index 4ef79f54a5..757534955d 100644 --- a/security/manager/ssl/SSLServerCertVerification.cpp +++ b/security/manager/ssl/SSLServerCertVerification.cpp @@ -567,15 +567,12 @@ CertErrorRunnable::CheckCertOverrides() // want a ballpark answer, we don't care. if (mErrorCodeTrust != 0) { uint32_t probeValue = MapOverridableErrorToProbeValue(mErrorCodeTrust); - Telemetry::Accumulate(Telemetry::SSL_CERT_ERROR_OVERRIDES, probeValue); } if (mErrorCodeMismatch != 0) { uint32_t probeValue = MapOverridableErrorToProbeValue(mErrorCodeMismatch); - Telemetry::Accumulate(Telemetry::SSL_CERT_ERROR_OVERRIDES, probeValue); } if (mErrorCodeTime != 0) { uint32_t probeValue = MapOverridableErrorToProbeValue(mErrorCodeTime); - Telemetry::Accumulate(Telemetry::SSL_CERT_ERROR_OVERRIDES, probeValue); } // all errors are covered by override rules, so let's accept the cert @@ -660,7 +657,6 @@ CreateCertErrorRunnable(CertVerifier& certVerifier, MOZ_ASSERT(cert); uint32_t probeValue = MapCertErrorToProbeValue(defaultErrorCodeToReport); - Telemetry::Accumulate(Telemetry::SSL_CERT_VERIFICATION_ERRORS, probeValue); uint32_t collected_errors = 0; PRErrorCode errorCodeTrust = 0; @@ -869,19 +865,11 @@ void AccumulateSubjectCommonNameTelemetry(const char* commonName, bool commonNameInSubjectAltNames) { - if (!commonName) { - // 1 means no common name present - Telemetry::Accumulate(Telemetry::BR_9_2_2_SUBJECT_COMMON_NAME, 1); - } else if (!commonNameInSubjectAltNames) { + if (!commonNameInSubjectAltNames) { MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("BR telemetry: common name '%s' not in subject alt. names " "(or the subject alt. names extension is not present)\n", commonName)); - // 2 means the common name is not present in subject alt names - Telemetry::Accumulate(Telemetry::BR_9_2_2_SUBJECT_COMMON_NAME, 2); - } else { - // 0 means the common name is present in subject alt names - Telemetry::Accumulate(Telemetry::BR_9_2_2_SUBJECT_COMMON_NAME, 0); } } @@ -947,8 +935,6 @@ GatherBaselineRequirementsTelemetry(const UniqueCERTCertList& certList) MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("BR telemetry: no subject alt names extension for '%s'\n", commonName.get())); - // 1 means there is no subject alt names extension - Telemetry::Accumulate(Telemetry::BR_9_2_1_SUBJECT_ALT_NAMES, 1); AccumulateSubjectCommonNameTelemetry(commonName.get(), false); return; } @@ -960,8 +946,6 @@ GatherBaselineRequirementsTelemetry(const UniqueCERTCertList& certList) MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("BR telemetry: could not decode subject alt names for '%s'\n", commonName.get())); - // 2 means the subject alt names extension could not be decoded - Telemetry::Accumulate(Telemetry::BR_9_2_1_SUBJECT_ALT_NAMES, 2); AccumulateSubjectCommonNameTelemetry(commonName.get(), false); return; } @@ -1044,24 +1028,6 @@ GatherBaselineRequirementsTelemetry(const UniqueCERTCertList& certList) currentName = CERT_GetNextGeneralName(currentName); } while (currentName && currentName != subjectAltNames); - if (nonDNSNameOrIPAddressPresent) { - // 3 means there's an entry that isn't an ip address or dns name - Telemetry::Accumulate(Telemetry::BR_9_2_1_SUBJECT_ALT_NAMES, 3); - } - if (malformedDNSNameOrIPAddressPresent) { - // 4 means there's a malformed ip address or dns name entry - Telemetry::Accumulate(Telemetry::BR_9_2_1_SUBJECT_ALT_NAMES, 4); - } - if (nonFQDNPresent) { - // 5 means there's a DNS name entry with a non-fully-qualified domain name - Telemetry::Accumulate(Telemetry::BR_9_2_1_SUBJECT_ALT_NAMES, 5); - } - if (!nonDNSNameOrIPAddressPresent && !malformedDNSNameOrIPAddressPresent && - !nonFQDNPresent) { - // 0 means the extension is acceptable - Telemetry::Accumulate(Telemetry::BR_9_2_1_SUBJECT_ALT_NAMES, 0); - } - AccumulateSubjectCommonNameTelemetry(commonName.get(), commonNameInSubjectAltNames); } @@ -1111,7 +1077,6 @@ GatherEKUTelemetry(const UniqueCERTCertList& certList) } if (!foundEKU) { - Telemetry::Accumulate(Telemetry::SSL_SERVER_AUTH_EKU, 0); return; } @@ -1133,18 +1098,6 @@ GatherEKUTelemetry(const UniqueCERTCertList& certList) foundOther = true; } } - - // Cases 3 is included only for completeness. It should never - // appear in these statistics, because CheckExtendedKeyUsage() - // should require the EKU extension, if present, to contain the - // value id_kp_serverAuth. - if (foundServerAuth && !foundOther) { - Telemetry::Accumulate(Telemetry::SSL_SERVER_AUTH_EKU, 1); - } else if (foundServerAuth && foundOther) { - Telemetry::Accumulate(Telemetry::SSL_SERVER_AUTH_EKU, 2); - } else if (!foundServerAuth) { - Telemetry::Accumulate(Telemetry::SSL_SERVER_AUTH_EKU, 3); - } } // Gathers telemetry on which CA is the root of a given cert chain. @@ -1210,9 +1163,6 @@ GatherEndEntityTelemetry(const UniqueCERTCertList& certList) if (durationInWeeks > (2 * ONE_YEAR_IN_WEEKS)) { durationInWeeks = (2 * ONE_YEAR_IN_WEEKS) + 1; } - - Telemetry::Accumulate(Telemetry::SSL_OBSERVED_END_ENTITY_CERTIFICATE_LIFETIME, - durationInWeeks); } // There are various things that we want to measure about certificate @@ -1229,75 +1179,14 @@ GatherSuccessfulValidationTelemetry(const UniqueCERTCertList& certList) void GatherTelemetryForSingleSCT(const ct::SignedCertificateTimestamp& sct) { - // See SSL_SCTS_ORIGIN in Histograms.json. - uint32_t origin = 0; - switch (sct.origin) { - case ct::SignedCertificateTimestamp::Origin::Embedded: - origin = 1; - break; - case ct::SignedCertificateTimestamp::Origin::TLSExtension: - origin = 2; - break; - case ct::SignedCertificateTimestamp::Origin::OCSPResponse: - origin = 3; - break; - default: - MOZ_ASSERT_UNREACHABLE("Unexpected SCT::Origin type"); - } - Telemetry::Accumulate(Telemetry::SSL_SCTS_ORIGIN, origin); - - // See SSL_SCTS_VERIFICATION_STATUS in Histograms.json. - uint32_t verificationStatus = 0; - switch (sct.verificationStatus) { - case ct::SignedCertificateTimestamp::VerificationStatus::OK: - verificationStatus = 1; - break; - case ct::SignedCertificateTimestamp::VerificationStatus::UnknownLog: - verificationStatus = 2; - break; - case ct::SignedCertificateTimestamp::VerificationStatus::InvalidSignature: - verificationStatus = 3; - break; - case ct::SignedCertificateTimestamp::VerificationStatus::InvalidTimestamp: - verificationStatus = 4; - break; - default: - MOZ_ASSERT_UNREACHABLE("Unexpected SCT::VerificationStatus type"); - } - Telemetry::Accumulate(Telemetry::SSL_SCTS_VERIFICATION_STATUS, - verificationStatus); +/* STUB */ } void GatherCertificateTransparencyTelemetry(const UniqueCERTCertList& certList, const CertificateTransparencyInfo& info) { - if (!info.enabled) { - // No telemetry is gathered when CT is disabled. - return; - } - - if (!info.processedSCTs) { - // We didn't receive any SCT data for this connection. - Telemetry::Accumulate(Telemetry::SSL_SCTS_PER_CONNECTION, 0); - return; - } - - for (const ct::SignedCertificateTimestamp& sct : info.verifyResult.scts) { - GatherTelemetryForSingleSCT(sct); - } - - // Decoding errors are reported to the 0th bucket - // of the SSL_SCTS_VERIFICATION_STATUS enumerated probe. - for (size_t i = 0; i < info.verifyResult.decodingErrors; ++i) { - Telemetry::Accumulate(Telemetry::SSL_SCTS_VERIFICATION_STATUS, 0); - } - - // Handle the histogram of SCTs counts. - uint32_t sctsCount = static_cast<uint32_t>(info.verifyResult.scts.length()); - // Note that sctsCount can be 0 in case we've received SCT binary data, - // but it failed to parse (e.g. due to unsupported CT protocol version). - Telemetry::Accumulate(Telemetry::SSL_SCTS_PER_CONNECTION, sctsCount); +/* STUB */ } // Note: Takes ownership of |peerCertChain| if SECSuccess is not returned. @@ -1350,29 +1239,6 @@ AuthCertificate(CertVerifier& certVerifier, uint32_t evStatus = (rv != Success) ? 0 // 0 = Failure : (evOidPolicy == SEC_OID_UNKNOWN) ? 1 // 1 = DV : 2; // 2 = EV - Telemetry::Accumulate(Telemetry::CERT_EV_STATUS, evStatus); - - if (ocspStaplingStatus != CertVerifier::OCSP_STAPLING_NEVER_CHECKED) { - Telemetry::Accumulate(Telemetry::SSL_OCSP_STAPLING, ocspStaplingStatus); - } - if (keySizeStatus != KeySizeStatus::NeverChecked) { - Telemetry::Accumulate(Telemetry::CERT_CHAIN_KEY_SIZE_STATUS, - static_cast<uint32_t>(keySizeStatus)); - } - if (sha1ModeResult != SHA1ModeResult::NeverChecked) { - Telemetry::Accumulate(Telemetry::CERT_CHAIN_SHA1_POLICY_STATUS, - static_cast<uint32_t>(sha1ModeResult)); - } - - if (pinningTelemetryInfo.accumulateForRoot) { - Telemetry::Accumulate(Telemetry::CERT_PINNING_FAILURES_BY_CA, - pinningTelemetryInfo.rootBucket); - } - - if (pinningTelemetryInfo.accumulateResult) { - Telemetry::Accumulate(pinningTelemetryInfo.certPinningResultHistogram, - pinningTelemetryInfo.certPinningResultBucket); - } if (rv == Success) { // Certificate verification succeeded. Delete any potential record of @@ -1517,7 +1383,6 @@ SSLServerCertVerificationJob::Run() new SSLServerCertVerificationResult(mInfoObject, 0, successTelemetry, interval)); restart->Dispatch(); - Telemetry::Accumulate(Telemetry::SSL_CERT_ERROR_OVERRIDES, 1); return NS_OK; } @@ -1527,7 +1392,6 @@ SSLServerCertVerificationJob::Run() { TimeStamp now = TimeStamp::Now(); MutexAutoLock telemetryMutex(*gSSLVerificationTelemetryMutex); - Telemetry::AccumulateTimeDelta(failureTelemetry, mJobStartTime, now); } if (error != 0) { RefPtr<CertErrorRunnable> runnable( @@ -1694,7 +1558,6 @@ AuthCertificateHook(void* arg, PRFileDesc* fd, PRBool checkSig, PRBool isServer) MOZ_ASSERT(peerCertChain || rv != SECSuccess, "AuthCertificate() should take ownership of chain on failure"); if (rv == SECSuccess) { - Telemetry::Accumulate(Telemetry::SSL_CERT_ERROR_OVERRIDES, 1); return SECSuccess; } @@ -1782,10 +1645,6 @@ SSLServerCertVerificationResult::Dispatch() NS_IMETHODIMP SSLServerCertVerificationResult::Run() { - // TODO: Assert that we're on the socket transport thread - if (mTelemetryID != Telemetry::HistogramCount) { - Telemetry::Accumulate(mTelemetryID, mTelemetryValue); - } // XXX: This cast will be removed by the next patch ((nsNSSSocketInfo*) mInfoObject.get()) ->SetCertVerificationResult(mErrorCode, mErrorMessageType); diff --git a/security/manager/ssl/nsKeygenHandler.cpp b/security/manager/ssl/nsKeygenHandler.cpp index c4529f8775..9196e200c0 100644 --- a/security/manager/ssl/nsKeygenHandler.cpp +++ b/security/manager/ssl/nsKeygenHandler.cpp @@ -399,48 +399,7 @@ loser: void GatherKeygenTelemetry(uint32_t keyGenMechanism, int keysize, char* curve) { - if (keyGenMechanism == CKM_RSA_PKCS_KEY_PAIR_GEN) { - if (keysize > 8196 || keysize < 0) { - return; - } - - nsCString telemetryValue("rsa"); - telemetryValue.AppendPrintf("%d", keysize); - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::KEYGEN_GENERATED_KEY_TYPE, telemetryValue); - } else if (keyGenMechanism == CKM_EC_KEY_PAIR_GEN) { - nsCString secp384r1 = NS_LITERAL_CSTRING("secp384r1"); - nsCString secp256r1 = NS_LITERAL_CSTRING("secp256r1"); - - mozilla::UniqueSECItem decoded = DecodeECParams(curve); - if (!decoded) { - switch (keysize) { - case 2048: - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::KEYGEN_GENERATED_KEY_TYPE, secp384r1); - break; - case 1024: - case 512: - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::KEYGEN_GENERATED_KEY_TYPE, secp256r1); - break; - } - } else { - if (secp384r1.EqualsIgnoreCase(curve, secp384r1.Length())) { - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::KEYGEN_GENERATED_KEY_TYPE, secp384r1); - } else if (secp256r1.EqualsIgnoreCase(curve, secp256r1.Length())) { - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::KEYGEN_GENERATED_KEY_TYPE, secp256r1); - } else { - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::KEYGEN_GENERATED_KEY_TYPE, NS_LITERAL_CSTRING("other_ec")); - } - } - } else { - MOZ_CRASH("Unknown keygen algorithm"); - return; - } +/* STUB */ } nsresult diff --git a/security/manager/ssl/nsNSSCallbacks.cpp b/security/manager/ssl/nsNSSCallbacks.cpp index 9411012651..6bac59f519 100644 --- a/security/manager/ssl/nsNSSCallbacks.cpp +++ b/security/manager/ssl/nsNSSCallbacks.cpp @@ -490,31 +490,6 @@ nsNSSHttpRequestSession::internal_send_receive_attempt(bool &retryable_error, } } - if (!event->mStartTime.IsNull()) { - if (request_canceled) { - Telemetry::Accumulate(Telemetry::CERT_VALIDATION_HTTP_REQUEST_RESULT, 0); - Telemetry::AccumulateTimeDelta( - Telemetry::CERT_VALIDATION_HTTP_REQUEST_CANCELED_TIME, - event->mStartTime, TimeStamp::Now()); - } - else if (NS_SUCCEEDED(mListener->mResultCode) && - mListener->mHttpResponseCode == 200) { - Telemetry::Accumulate(Telemetry::CERT_VALIDATION_HTTP_REQUEST_RESULT, 1); - Telemetry::AccumulateTimeDelta( - Telemetry::CERT_VALIDATION_HTTP_REQUEST_SUCCEEDED_TIME, - event->mStartTime, TimeStamp::Now()); - } - else { - Telemetry::Accumulate(Telemetry::CERT_VALIDATION_HTTP_REQUEST_RESULT, 2); - Telemetry::AccumulateTimeDelta( - Telemetry::CERT_VALIDATION_HTTP_REQUEST_FAILED_TIME, - event->mStartTime, TimeStamp::Now()); - } - } - else { - Telemetry::Accumulate(Telemetry::CERT_VALIDATION_HTTP_REQUEST_RESULT, 3); - } - if (request_canceled) { return Result::ERROR_OCSP_SERVER_ERROR; } @@ -996,7 +971,6 @@ PreliminaryHandshakeDone(PRFileDesc* fd) } else { infoObject->SetNegotiatedNPN(nullptr, 0); } - mozilla::Telemetry::Accumulate(Telemetry::SSL_NPN_TYPE, state); } else { infoObject->SetNegotiatedNPN(nullptr, 0); } @@ -1091,9 +1065,6 @@ CanFalseStartCallback(PRFileDesc* fd, void* client_data, PRBool *canFalseStart) } } - Telemetry::Accumulate(Telemetry::SSL_REASONS_FOR_NOT_FALSE_STARTING, - reasonsForNotFalseStarting); - if (reasonsForNotFalseStarting == 0) { *canFalseStart = PR_TRUE; infoObject->SetFalseStarted(); @@ -1118,7 +1089,6 @@ AccumulateNonECCKeySize(Telemetry::ID probe, uint32_t bits) : bits < 8192 ? 17 : bits == 8192 ? 18 : bits < 16384 ? 19 : bits == 16384 ? 20 : 0; - Telemetry::Accumulate(probe, value); } // XXX: This attempts to map a bit count to an ECC named curve identifier. In @@ -1134,7 +1104,6 @@ AccumulateECCCurve(Telemetry::ID probe, uint32_t bits) : bits == 384 ? 24 // P-384 : bits == 521 ? 25 // P-521 : 0; // Unknown - Telemetry::Accumulate(probe, value); } static void @@ -1197,7 +1166,6 @@ AccumulateCipherSuite(Telemetry::ID probe, const SSLChannelInfo& channelInfo) break; } MOZ_ASSERT(value != 0); - Telemetry::Accumulate(probe, value); } // In the case of session resumption, the AuthCertificate hook has been bypassed @@ -1318,7 +1286,6 @@ void HandshakeCallback(PRFileDesc* fd, void* client_data) { // 1=tls1, 2=tls1.1, 3=tls1.2 unsigned int versionEnum = channelInfo.protocolVersion & 0xFF; MOZ_ASSERT(versionEnum > 0); - Telemetry::Accumulate(Telemetry::SSL_HANDSHAKE_VERSION, versionEnum); AccumulateCipherSuite( infoObject->IsFullHandshake() ? Telemetry::SSL_CIPHER_SUITE_FULL : Telemetry::SSL_CIPHER_SUITE_RESUMED, @@ -1331,13 +1298,6 @@ void HandshakeCallback(PRFileDesc* fd, void* client_data) { if (rv == SECSuccess) { usesFallbackCipher = channelInfo.keaType == ssl_kea_dh; - // keyExchange null=0, rsa=1, dh=2, fortezza=3, ecdh=4 - Telemetry::Accumulate( - infoObject->IsFullHandshake() - ? Telemetry::SSL_KEY_EXCHANGE_ALGORITHM_FULL - : Telemetry::SSL_KEY_EXCHANGE_ALGORITHM_RESUMED, - channelInfo.keaType); - MOZ_ASSERT(infoObject->GetKEAUsed() == channelInfo.keaType); if (infoObject->IsFullHandshake()) { @@ -1359,9 +1319,6 @@ void HandshakeCallback(PRFileDesc* fd, void* client_data) { break; } - Telemetry::Accumulate(Telemetry::SSL_AUTH_ALGORITHM_FULL, - channelInfo.authType); - // RSA key exchange doesn't use a signature for auth. if (channelInfo.keaType != ssl_kea_rsa) { switch (channelInfo.authType) { @@ -1380,12 +1337,6 @@ void HandshakeCallback(PRFileDesc* fd, void* client_data) { } } } - - Telemetry::Accumulate( - infoObject->IsFullHandshake() - ? Telemetry::SSL_SYMMETRIC_CIPHER_FULL - : Telemetry::SSL_SYMMETRIC_CIPHER_RESUMED, - cipherInfo.symCipher); } } diff --git a/security/manager/ssl/nsNSSComponent.cpp b/security/manager/ssl/nsNSSComponent.cpp index 14b1312de7..4fc8c142ef 100644 --- a/security/manager/ssl/nsNSSComponent.cpp +++ b/security/manager/ssl/nsNSSComponent.cpp @@ -805,29 +805,22 @@ nsNSSComponent::MaybeEnableFamilySafetyCompatibility() if (familySafetyMode > 2) { familySafetyMode = 0; } - Telemetry::Accumulate(Telemetry::FAMILY_SAFETY, familySafetyMode); if (familySafetyMode == 0) { return; } bool familySafetyEnabled; nsresult rv = AccountHasFamilySafetyEnabled(familySafetyEnabled); if (NS_FAILED(rv)) { - Telemetry::Accumulate(Telemetry::FAMILY_SAFETY, 3); return; } if (!familySafetyEnabled) { - Telemetry::Accumulate(Telemetry::FAMILY_SAFETY, 4); return; } - Telemetry::Accumulate(Telemetry::FAMILY_SAFETY, 5); if (familySafetyMode == 2) { rv = LoadFamilySafetyRoot(); if (NS_FAILED(rv)) { - Telemetry::Accumulate(Telemetry::FAMILY_SAFETY, 6); MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("failed to load Family Safety root")); - } else { - Telemetry::Accumulate(Telemetry::FAMILY_SAFETY, 7); } } #endif // XP_WIN @@ -1580,13 +1573,6 @@ void nsNSSComponent::setValidationOptions(bool isInitialSetting, bool ocspRequired = ocspEnabled && Preferences::GetBool("security.OCSP.require", false); - // We measure the setting of the pref at startup only to minimize noise by - // addons that may muck with the settings, though it probably doesn't matter. - if (isInitialSetting) { - Telemetry::Accumulate(Telemetry::CERT_OCSP_ENABLED, ocspEnabled); - Telemetry::Accumulate(Telemetry::CERT_OCSP_REQUIRED, ocspRequired); - } - bool ocspStaplingEnabled = Preferences::GetBool("security.ssl.enable_ocsp_stapling", true); PublicSSLState()->SetOCSPStaplingEnabled(ocspStaplingEnabled); @@ -1978,9 +1964,6 @@ nsNSSComponent::InitializeNSS() return NS_ERROR_FAILURE; } - if (PK11_IsFIPS()) { - Telemetry::Accumulate(Telemetry::FIPS_ENABLED, true); - } MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("NSS Initialization done\n")); return NS_OK; } diff --git a/security/manager/ssl/nsNSSIOLayer.cpp b/security/manager/ssl/nsNSSIOLayer.cpp index 2d49540fbd..93fca396b1 100644 --- a/security/manager/ssl/nsNSSIOLayer.cpp +++ b/security/manager/ssl/nsNSSIOLayer.cpp @@ -237,9 +237,6 @@ nsNSSSocketInfo::NoteTimeUntilReady() mNotedTimeUntilReady = true; - // This will include TCP and proxy tunnel wait time - Telemetry::AccumulateTimeDelta(Telemetry::SSL_TIME_UNTIL_READY, - mSocketCreationTimestamp, TimeStamp::Now()); MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("[%p] nsNSSSocketInfo::NoteTimeUntilReady\n", mFd)); } @@ -259,16 +256,6 @@ nsNSSSocketInfo::SetHandshakeCompleted() : mFalseStarted ? FalseStarted : mFalseStartCallbackCalled ? ChoseNotToFalseStart : NotAllowedToFalseStart; - - // This will include TCP and proxy tunnel wait time - Telemetry::AccumulateTimeDelta(Telemetry::SSL_TIME_UNTIL_HANDSHAKE_FINISHED, - mSocketCreationTimestamp, TimeStamp::Now()); - - // If the handshake is completed for the first time from just 1 callback - // that means that TLS session resumption must have been used. - Telemetry::Accumulate(Telemetry::SSL_RESUMED_SESSION, - handshakeType == Resumption); - Telemetry::Accumulate(Telemetry::SSL_HANDSHAKE_TYPE, handshakeType); } @@ -623,11 +610,6 @@ nsNSSSocketInfo::SetCertVerificationResult(PRErrorCode errorCode, SetCanceled(errorCode, errorMessageType); } - if (mPlaintextBytesRead && !errorCode) { - Telemetry::Accumulate(Telemetry::SSL_BYTES_BEFORE_CERT_CALLBACK, - AssertedCast<uint32_t>(mPlaintextBytesRead)); - } - mCertVerificationState = after_cert_verification; } @@ -1121,8 +1103,6 @@ retryDueToTLSIntolerance(PRErrorCode err, nsNSSSocketInfo* socketInfo) PRErrorCode originalReason = helpers.getIntoleranceReason(socketInfo->GetHostName(), socketInfo->GetPort()); - Telemetry::Accumulate(Telemetry::SSL_VERSION_FALLBACK_INAPPROPRIATE, - tlsIntoleranceTelemetryBucket(originalReason)); helpers.forgetIntolerance(socketInfo->GetHostName(), socketInfo->GetPort()); @@ -1144,11 +1124,8 @@ retryDueToTLSIntolerance(PRErrorCode err, nsNSSSocketInfo* socketInfo) helpers.mUnrestrictedRC4Fallback) { if (helpers.rememberStrongCiphersFailed(socketInfo->GetHostName(), socketInfo->GetPort(), err)) { - Telemetry::Accumulate(Telemetry::SSL_WEAK_CIPHERS_FALLBACK, - tlsIntoleranceTelemetryBucket(err)); return true; } - Telemetry::Accumulate(Telemetry::SSL_WEAK_CIPHERS_FALLBACK, 0); } } @@ -1191,18 +1168,12 @@ retryDueToTLSIntolerance(PRErrorCode err, nsNSSSocketInfo* socketInfo) return false; } - // The difference between _PRE and _POST represents how often we avoided - // TLS intolerance fallback due to remembered tolerance. - Telemetry::Accumulate(pre, reason); - if (!helpers.rememberIntolerantAtVersion(socketInfo->GetHostName(), socketInfo->GetPort(), range.min, range.max, err)) { return false; } - Telemetry::Accumulate(post, reason); - return true; } @@ -1242,8 +1213,6 @@ reportHandshakeResult(int32_t bytesTransferred, bool wasReading, PRErrorCode err } else { bucket = 671; } - - Telemetry::Accumulate(Telemetry::SSL_HANDSHAKE_RESULT, bucket); } int32_t diff --git a/security/manager/ssl/nsNTLMAuthModule.cpp b/security/manager/ssl/nsNTLMAuthModule.cpp index a0564118a3..46a4a21a03 100644 --- a/security/manager/ssl/nsNTLMAuthModule.cpp +++ b/security/manager/ssl/nsNTLMAuthModule.cpp @@ -1009,11 +1009,6 @@ nsNTLMAuthModule::Init(const char *serviceName, static bool sTelemetrySent = false; if (!sTelemetrySent) { - mozilla::Telemetry::Accumulate( - mozilla::Telemetry::NTLM_MODULE_USED_2, - serviceFlags & nsIAuthModule::REQ_PROXY_AUTH - ? NTLM_MODULE_GENERIC_PROXY - : NTLM_MODULE_GENERIC_DIRECT); sTelemetrySent = true; } diff --git a/security/manager/ssl/nsPKCS11Slot.cpp b/security/manager/ssl/nsPKCS11Slot.cpp index 780a7c4b28..015f869011 100644 --- a/security/manager/ssl/nsPKCS11Slot.cpp +++ b/security/manager/ssl/nsPKCS11Slot.cpp @@ -541,10 +541,6 @@ nsPKCS11ModuleDB::ToggleFIPSMode() return NS_ERROR_FAILURE; } - if (PK11_IsFIPS()) { - Telemetry::Accumulate(Telemetry::FIPS_ENABLED, true); - } - return NS_OK; } diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp index 371f4795c0..d4102efa16 100644 --- a/startupcache/StartupCache.cpp +++ b/startupcache/StartupCache.cpp @@ -242,31 +242,6 @@ StartupCache::LoadArchive(enum TelemetrifyAge flag) mArchive = new nsZipArchive(); rv = mArchive->OpenArchive(mFile); - if (NS_FAILED(rv) || flag == IGNORE_AGE) - return rv; - - nsCString comment; - if (!mArchive->GetComment(comment)) { - return rv; - } - - const char *data; - size_t len = NS_CStringGetData(comment, &data); - PRTime creationStamp; - // We might not have a comment if the startup cache file was created - // before we started recording creation times in the comment. - if (len == sizeof(creationStamp)) { - memcpy(&creationStamp, data, len); - PRTime current = PR_Now(); - int64_t diff = current - creationStamp; - - // We can't use AccumulateTimeDelta here because we have no way of - // reifying a TimeStamp from creationStamp. - int64_t usec_per_hour = PR_USEC_PER_SEC * int64_t(3600); - int64_t hour_diff = (diff + usec_per_hour - 1) / usec_per_hour; - mozilla::Telemetry::Accumulate(Telemetry::STARTUP_CACHE_AGE_HOURS, - hour_diff); - } return rv; } @@ -497,7 +472,6 @@ StartupCache::InvalidateCache() if (NS_FAILED(rv) && rv != NS_ERROR_FILE_TARGET_DOES_NOT_EXIST && rv != NS_ERROR_FILE_NOT_FOUND) { gIgnoreDiskCache = true; - mozilla::Telemetry::Accumulate(Telemetry::STARTUP_CACHE_INVALID, true); return; } gIgnoreDiskCache = false; diff --git a/storage/TelemetryVFS.cpp b/storage/TelemetryVFS.cpp index 5a025e29e2..62f315ad0b 100644 --- a/storage/TelemetryVFS.cpp +++ b/storage/TelemetryVFS.cpp @@ -101,12 +101,6 @@ public: ~IOThreadAutoTimer() { - TimeStamp end(TimeStamp::Now()); - uint32_t mainThread = NS_IsMainThread() ? 1 : 0; - if (id != Telemetry::HistogramCount) { - Telemetry::AccumulateTimeDelta(static_cast<Telemetry::ID>(id + mainThread), - start, end); - } // We don't report SQLite I/O on Windows because we have a comprehensive // mechanism for intercepting I/O on that platform that captures a superset // of the data captured here. @@ -361,8 +355,6 @@ xRead(sqlite3_file *pFile, void *zBuf, int iAmt, sqlite_int64 iOfst) int rc; rc = p->pReal->pMethods->xRead(p->pReal, zBuf, iAmt, iOfst); // sqlite likes to read from empty files, this is normal, ignore it. - if (rc != SQLITE_IOERR_SHORT_READ) - Telemetry::Accumulate(p->histograms->readB, rc == SQLITE_OK ? iAmt : 0); return rc; } @@ -395,7 +387,6 @@ xWrite(sqlite3_file *pFile, const void *zBuf, int iAmt, sqlite_int64 iOfst) } } rc = p->pReal->pMethods->xWrite(p->pReal, zBuf, iAmt, iOfst); - Telemetry::Accumulate(p->histograms->writeB, rc == SQLITE_OK ? iAmt : 0); if (p->quotaObject && rc != SQLITE_OK) { NS_WARNING("xWrite failed on a quota-controlled file, attempting to " "update its current size..."); diff --git a/storage/mozStorageAsyncStatementExecution.cpp b/storage/mozStorageAsyncStatementExecution.cpp index e1d344aca6..6d0682dc5a 100644 --- a/storage/mozStorageAsyncStatementExecution.cpp +++ b/storage/mozStorageAsyncStatementExecution.cpp @@ -235,14 +235,12 @@ AsyncExecuteStatements::executeStatement(sqlite3_stmt *aStatement) // Stop if we have no more results. if (rc == SQLITE_DONE) { - Telemetry::Accumulate(Telemetry::MOZ_STORAGE_ASYNC_REQUESTS_SUCCESS, true); return false; } // If we got results, we can return now. if (rc == SQLITE_ROW) { - Telemetry::Accumulate(Telemetry::MOZ_STORAGE_ASYNC_REQUESTS_SUCCESS, true); return true; } @@ -258,7 +256,6 @@ AsyncExecuteStatements::executeStatement(sqlite3_stmt *aStatement) // Set an error state. mState = ERROR; - Telemetry::Accumulate(Telemetry::MOZ_STORAGE_ASYNC_REQUESTS_SUCCESS, false); // Construct the error message before giving up the mutex (which we cannot // hold during the call to notifyError). diff --git a/toolkit/components/alerts/nsAlertsService.cpp b/toolkit/components/alerts/nsAlertsService.cpp index dd67ad9831..73dbb265c9 100644 --- a/toolkit/components/alerts/nsAlertsService.cpp +++ b/toolkit/components/alerts/nsAlertsService.cpp @@ -6,7 +6,6 @@ #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/PermissionMessageUtils.h" #include "mozilla/Preferences.h" -#include "mozilla/Telemetry.h" #include "nsXULAppAPI.h" #include "nsAlertsService.h" @@ -292,9 +291,6 @@ NS_IMETHODIMP nsAlertsService::SetManualDoNotDisturb(bool aDoNotDisturb) NS_ENSURE_TRUE(alertsDND, NS_ERROR_NOT_IMPLEMENTED); nsresult rv = alertsDND->SetManualDoNotDisturb(aDoNotDisturb); - if (NS_SUCCEEDED(rv)) { - Telemetry::Accumulate(Telemetry::ALERTS_SERVICE_DND_ENABLED, 1); - } return rv; #endif } diff --git a/toolkit/components/downloads/ApplicationReputation.cpp b/toolkit/components/downloads/ApplicationReputation.cpp index 1c94d6713c..a369ca8841 100644 --- a/toolkit/components/downloads/ApplicationReputation.cpp +++ b/toolkit/components/downloads/ApplicationReputation.cpp @@ -34,7 +34,6 @@ #include "mozilla/LoadContext.h" #include "mozilla/Preferences.h" #include "mozilla/Services.h" -#include "mozilla/Telemetry.h" #include "mozilla/TimeStamp.h" #include "nsAutoPtr.h" @@ -59,7 +58,6 @@ using mozilla::DocShellOriginAttributes; using mozilla::PrincipalOriginAttributes; using mozilla::Preferences; using mozilla::TimeStamp; -using mozilla::Telemetry::Accumulate; using safe_browsing::ClientDownloadRequest; using safe_browsing::ClientDownloadRequest_CertificateChain; using safe_browsing::ClientDownloadRequest_Resource; @@ -356,7 +354,6 @@ PendingDBLookup::HandleEvent(const nsACString& tables) Preferences::GetCString(PREF_DOWNLOAD_BLOCK_TABLE, &blockList); if (!mAllowlistOnly && FindInReadable(blockList, tables)) { mPendingLookup->mBlocklistCount++; - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_LOCAL, BLOCK_LIST); LOG(("Found principal %s on blocklist [this = %p]", mSpec.get(), this)); return mPendingLookup->OnComplete(true, NS_OK, nsIApplicationReputationService::VERDICT_DANGEROUS); @@ -366,13 +363,11 @@ PendingDBLookup::HandleEvent(const nsACString& tables) Preferences::GetCString(PREF_DOWNLOAD_ALLOW_TABLE, &allowList); if (FindInReadable(allowList, tables)) { mPendingLookup->mAllowlistCount++; - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_LOCAL, ALLOW_LIST); LOG(("Found principal %s on allowlist [this = %p]", mSpec.get(), this)); // Don't call onComplete, since blocklisting trumps allowlisting } else { LOG(("Didn't find principal %s on any list [this = %p]", mSpec.get(), this)); - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_LOCAL, NO_LIST); } return mPendingLookup->LookupNext(); } @@ -1144,8 +1139,6 @@ PendingLookup::OnComplete(bool shouldBlock, nsresult rv, uint32_t verdict) mTimeoutTimer = nullptr; } - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_SHOULD_BLOCK, - shouldBlock); double t = (TimeStamp::Now() - mStartTime).ToMilliseconds(); LOG(("Application Reputation verdict is %lu, obtained in %f ms [this = %p]", verdict, t, this)); @@ -1393,8 +1386,6 @@ PendingLookup::Notify(nsITimer* aTimer) { LOG(("Remote lookup timed out [this = %p]", this)); MOZ_ASSERT(aTimer == mTimeoutTimer); - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_REMOTE_LOOKUP_TIMEOUT, - true); mChannel->Cancel(NS_ERROR_NET_TIMEOUT); mTimeoutTimer->Cancel(); return NS_OK; @@ -1457,8 +1448,6 @@ PendingLookup::OnStopRequest(nsIRequest *aRequest, bool shouldBlock = false; uint32_t verdict = nsIApplicationReputationService::VERDICT_SAFE; - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_REMOTE_LOOKUP_TIMEOUT, - false); nsresult rv = OnStopRequestInternal(aRequest, aContext, aResult, &shouldBlock, &verdict); @@ -1473,8 +1462,6 @@ PendingLookup::OnStopRequestInternal(nsIRequest *aRequest, bool* aShouldBlock, uint32_t* aVerdict) { if (NS_FAILED(aResult)) { - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_SERVER, - SERVER_RESPONSE_FAILED); return aResult; } @@ -1483,22 +1470,16 @@ PendingLookup::OnStopRequestInternal(nsIRequest *aRequest, nsresult rv; nsCOMPtr<nsIHttpChannel> channel = do_QueryInterface(aRequest, &rv); if (NS_FAILED(rv)) { - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_SERVER, - SERVER_RESPONSE_FAILED); return rv; } uint32_t status = 0; rv = channel->GetResponseStatus(&status); if (NS_FAILED(rv)) { - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_SERVER, - SERVER_RESPONSE_FAILED); return rv; } if (status != 200) { - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_SERVER, - SERVER_RESPONSE_FAILED); return NS_ERROR_NOT_AVAILABLE; } @@ -1506,16 +1487,9 @@ PendingLookup::OnStopRequestInternal(nsIRequest *aRequest, safe_browsing::ClientDownloadResponse response; if (!response.ParseFromString(buf)) { LOG(("Invalid protocol buffer response [this = %p]: %s", this, buf.c_str())); - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_SERVER, - SERVER_RESPONSE_INVALID); return NS_ERROR_CANNOT_CONVERT_DATA; } - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_SERVER, - SERVER_RESPONSE_VALID); - // Clamp responses 0-7, we only know about 0-4 for now. - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_SERVER_VERDICT, - std::min<uint32_t>(response.verdict(), 7)); switch(response.verdict()) { case safe_browsing::ClientDownloadResponse::DANGEROUS: *aShouldBlock = Preferences::GetBool(PREF_BLOCK_DANGEROUS, true); @@ -1583,11 +1557,8 @@ ApplicationReputationService::QueryReputation( NS_ENSURE_ARG_POINTER(aQuery); NS_ENSURE_ARG_POINTER(aCallback); - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_COUNT, true); nsresult rv = QueryReputationInternal(aQuery, aCallback); if (NS_FAILED(rv)) { - Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_SHOULD_BLOCK, - false); aCallback->OnComplete(false, rv, nsIApplicationReputationService::VERDICT_SAFE); } diff --git a/toolkit/components/perfmonitoring/nsPerformanceStats.cpp b/toolkit/components/perfmonitoring/nsPerformanceStats.cpp index eb924de46e..33aeaf7c26 100644 --- a/toolkit/components/perfmonitoring/nsPerformanceStats.cpp +++ b/toolkit/components/perfmonitoring/nsPerformanceStats.cpp @@ -27,7 +27,6 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/EventStateManager.h" #include "mozilla/Services.h" -#include "mozilla/Telemetry.h" #if defined(XP_WIN) #include <processthreadsapi.h> @@ -957,22 +956,7 @@ nsPerformanceStatsService::SetJankAlertBufferingDelay(uint32_t value) { nsresult nsPerformanceStatsService::UpdateTelemetry() { - // Promote everything to floating-point explicitly before dividing. - const double processStayed = mProcessStayed; - const double processMoved = mProcessMoved; - - if (processStayed <= 0 || processMoved <= 0 || processStayed + processMoved <= 0) { - // Overflow/underflow/nothing to report - return NS_OK; - } - - const double proportion = (100 * processStayed) / (processStayed + processMoved); - if (proportion < 0 || proportion > 100) { - // Overflow/underflow - return NS_OK; - } - - mozilla::Telemetry::Accumulate(mozilla::Telemetry::PERF_MONITORING_TEST_CPU_RESCHEDULING_PROPORTION_MOVED, (uint32_t)proportion); + /* STUB */ return NS_OK; } diff --git a/toolkit/components/places/Database.cpp b/toolkit/components/places/Database.cpp index 37502e2a14..a87c14b37a 100644 --- a/toolkit/components/places/Database.cpp +++ b/toolkit/components/places/Database.cpp @@ -615,9 +615,6 @@ Database::BackupAndReplaceDatabaseFile(nsCOMPtr<mozIStorageService>& aStorage) // Set up a pref to try replacing the database at the next startup. Preferences::SetBool(PREF_FORCE_DATABASE_REPLACEMENT, true); } - // Report the corruption through telemetry. - Telemetry::Accumulate(Telemetry::PLACES_DATABASE_CORRUPTION_HANDLING_STAGE, - static_cast<int8_t>(stage)); }); // Close database connection if open. diff --git a/toolkit/components/places/FaviconHelpers.cpp b/toolkit/components/places/FaviconHelpers.cpp index 69c2023380..ca08cdff4a 100644 --- a/toolkit/components/places/FaviconHelpers.cpp +++ b/toolkit/components/places/FaviconHelpers.cpp @@ -14,7 +14,6 @@ #include "nsNavHistory.h" #include "nsFaviconService.h" #include "mozilla/storage.h" -#include "mozilla/Telemetry.h" #include "nsNetUtil.h" #include "nsPrintfCString.h" #include "nsStreamUtils.h" @@ -581,33 +580,6 @@ AsyncFetchAndSetIconForPage::OnStopRequest(nsIRequest* aRequest, mIcon.expiration = GetExpirationTimeFromChannel(channel); - // Telemetry probes to measure the favicon file sizes for each different file type. - // This allow us to measure common file sizes while also observing each type popularity. - if (mIcon.mimeType.EqualsLiteral("image/png")) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::PLACES_FAVICON_PNG_SIZES, mIcon.data.Length()); - } - else if (mIcon.mimeType.EqualsLiteral("image/x-icon") || - mIcon.mimeType.EqualsLiteral("image/vnd.microsoft.icon")) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::PLACES_FAVICON_ICO_SIZES, mIcon.data.Length()); - } - else if (mIcon.mimeType.EqualsLiteral("image/jpeg") || - mIcon.mimeType.EqualsLiteral("image/pjpeg")) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::PLACES_FAVICON_JPEG_SIZES, mIcon.data.Length()); - } - else if (mIcon.mimeType.EqualsLiteral("image/gif")) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::PLACES_FAVICON_GIF_SIZES, mIcon.data.Length()); - } - else if (mIcon.mimeType.EqualsLiteral("image/bmp") || - mIcon.mimeType.EqualsLiteral("image/x-windows-bmp")) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::PLACES_FAVICON_BMP_SIZES, mIcon.data.Length()); - } - else if (mIcon.mimeType.EqualsLiteral("image/svg+xml")) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::PLACES_FAVICON_SVG_SIZES, mIcon.data.Length()); - } - else { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::PLACES_FAVICON_OTHER_SIZES, mIcon.data.Length()); - } - rv = OptimizeIconSize(mIcon, favicons); NS_ENSURE_SUCCESS(rv, rv); diff --git a/toolkit/components/places/Helpers.cpp b/toolkit/components/places/Helpers.cpp index 66c4e79a9b..dda1621979 100644 --- a/toolkit/components/places/Helpers.cpp +++ b/toolkit/components/places/Helpers.cpp @@ -385,9 +385,7 @@ AsyncStatementCallbackNotifier::HandleCompletion(uint16_t aReason) NS_IMETHODIMP AsyncStatementTelemetryTimer::HandleCompletion(uint16_t aReason) { - if (aReason == mozIStorageStatementCallback::REASON_FINISHED) { - Telemetry::AccumulateTimeDelta(mHistogramId, mStart); - } + /* STUB */ return NS_OK; } diff --git a/toolkit/components/startup/nsAppStartup.cpp b/toolkit/components/startup/nsAppStartup.cpp index 3913896055..53f8c56702 100644 --- a/toolkit/components/startup/nsAppStartup.cpp +++ b/toolkit/components/startup/nsAppStartup.cpp @@ -758,11 +758,6 @@ nsAppStartup::GetStartupInfo(JSContext* aCx, JS::MutableHandle<JS::Value> aRetva procTime = TimeStamp::ProcessCreation(error); - if (error) { - Telemetry::Accumulate(Telemetry::STARTUP_MEASUREMENT_ERRORS, - StartupTimeline::PROCESS_CREATION); - } - StartupTimeline::Record(StartupTimeline::PROCESS_CREATION, procTime); } @@ -777,8 +772,6 @@ nsAppStartup::GetStartupInfo(JSContext* aCx, JS::MutableHandle<JS::Value> aRetva // Always define main to aid with bug 689256. stamp = procTime; MOZ_ASSERT(!stamp.IsNull()); - Telemetry::Accumulate(Telemetry::STARTUP_MEASUREMENT_ERRORS, - StartupTimeline::MAIN); } if (!stamp.IsNull()) { @@ -787,8 +780,6 @@ nsAppStartup::GetStartupInfo(JSContext* aCx, JS::MutableHandle<JS::Value> aRetva / PR_USEC_PER_MSEC; JS::Rooted<JSObject*> date(aCx, JS::NewDateObject(aCx, JS::TimeClip(prStamp))); JS_DefineProperty(aCx, obj, StartupTimeline::Describe(ev), date, JSPROP_ENUMERATE); - } else { - Telemetry::Accumulate(Telemetry::STARTUP_MEASUREMENT_ERRORS, ev); } } } @@ -887,9 +878,6 @@ nsAppStartup::TrackStartupCrashBegin(bool *aIsSafeModeNecessary) if (PR_Now() / PR_USEC_PER_SEC <= lastSuccessfulStartup) return NS_ERROR_FAILURE; - // The last startup was a crash so include it in the count regardless of when it happened. - Telemetry::Accumulate(Telemetry::STARTUP_CRASH_DETECTED, true); - if (inSafeMode) { GetAutomaticSafeModeNecessary(aIsSafeModeNecessary); return NS_OK; diff --git a/toolkit/components/url-classifier/Classifier.cpp b/toolkit/components/url-classifier/Classifier.cpp index bbaeaf5352..e183728bd5 100644 --- a/toolkit/components/url-classifier/Classifier.cpp +++ b/toolkit/components/url-classifier/Classifier.cpp @@ -15,7 +15,6 @@ #include "nsNetCID.h" #include "nsPrintfCString.h" #include "nsThreadUtils.h" -#include "mozilla/Telemetry.h" #include "mozilla/Logging.h" #include "mozilla/SyncRunnable.h" #include "mozilla/Base64.h" @@ -498,9 +497,6 @@ Classifier::Check(const nsACString& aSpec, matchingStatistics |= PrefixMatch::eMatchV2Prefix; } } - - Telemetry::Accumulate(Telemetry::URLCLASSIFIER_PREFIX_MATCH, - static_cast<uint8_t>(matchingStatistics)); } return NS_OK; diff --git a/toolkit/components/url-classifier/LookupCache.cpp b/toolkit/components/url-classifier/LookupCache.cpp index 5a3b1e36d0..420e07433a 100644 --- a/toolkit/components/url-classifier/LookupCache.cpp +++ b/toolkit/components/url-classifier/LookupCache.cpp @@ -6,7 +6,6 @@ #include "LookupCache.h" #include "HashStore.h" #include "nsISeekableStream.h" -#include "mozilla/Telemetry.h" #include "mozilla/Logging.h" #include "nsNetUtil.h" #include "prprf.h" @@ -451,9 +450,6 @@ nsresult LookupCacheV2::Build(AddPrefixArray& aAddPrefixes, AddCompleteArray& aAddCompletes) { - Telemetry::Accumulate(Telemetry::URLCLASSIFIER_LC_COMPLETIONS, - static_cast<uint32_t>(aAddCompletes.Length())); - mUpdateCompletions.Clear(); mUpdateCompletions.SetCapacity(aAddCompletes.Length()); for (uint32_t i = 0; i < aAddCompletes.Length(); i++) { @@ -462,9 +458,6 @@ LookupCacheV2::Build(AddPrefixArray& aAddPrefixes, aAddCompletes.Clear(); mUpdateCompletions.Sort(); - Telemetry::Accumulate(Telemetry::URLCLASSIFIER_LC_PREFIXES, - static_cast<uint32_t>(aAddPrefixes.Length())); - nsresult rv = ConstructPrefixSet(aAddPrefixes); NS_ENSURE_SUCCESS(rv, rv); mPrimed = true; diff --git a/toolkit/components/url-classifier/LookupCacheV4.cpp b/toolkit/components/url-classifier/LookupCacheV4.cpp index 7258ae3583..a96e4931ac 100644 --- a/toolkit/components/url-classifier/LookupCacheV4.cpp +++ b/toolkit/components/url-classifier/LookupCacheV4.cpp @@ -144,9 +144,6 @@ LookupCacheV4::LoadFromFile(nsIFile* aFile) } rv = VerifyChecksum(checksum); - Telemetry::Accumulate(Telemetry::URLCLASSIFIER_VLPS_LOAD_CORRUPT, - rv == NS_ERROR_FILE_CORRUPTED); - return rv; } @@ -231,8 +228,6 @@ LookupCacheV4::ApplyUpdate(TableUpdateV4* aTableUpdate, if (!isOldMapEmpty && !isAddMapEmpty) { if (smallestOldPrefix == smallestAddPrefix) { LOG(("Add prefix should not exist in the original prefix set.")); - Telemetry::Accumulate(Telemetry::URLCLASSIFIER_UPDATE_ERROR_TYPE, - DUPLICATE_PREFIX); return NS_ERROR_FAILURE; } @@ -274,15 +269,11 @@ LookupCacheV4::ApplyUpdate(TableUpdateV4* aTableUpdate, // the number of original prefix plus add prefix. if (index <= 0) { LOG(("There are still prefixes remaining after reaching maximum runs.")); - Telemetry::Accumulate(Telemetry::URLCLASSIFIER_UPDATE_ERROR_TYPE, - INFINITE_LOOP); return NS_ERROR_FAILURE; } if (removalIndex < removalArray.Length()) { LOG(("There are still prefixes to remove after exhausting the old PrefixSet.")); - Telemetry::Accumulate(Telemetry::URLCLASSIFIER_UPDATE_ERROR_TYPE, - WRONG_REMOVAL_INDICES); return NS_ERROR_FAILURE; } @@ -290,8 +281,6 @@ LookupCacheV4::ApplyUpdate(TableUpdateV4* aTableUpdate, crypto->Finish(false, checksum); if (aTableUpdate->Checksum().IsEmpty()) { LOG(("Update checksum missing.")); - Telemetry::Accumulate(Telemetry::URLCLASSIFIER_UPDATE_ERROR_TYPE, - MISSING_CHECKSUM); // Generate our own checksum to tableUpdate to ensure there is always // checksum in .metadata @@ -300,8 +289,6 @@ LookupCacheV4::ApplyUpdate(TableUpdateV4* aTableUpdate, } else if (aTableUpdate->Checksum() != checksum){ LOG(("Checksum mismatch after applying partial update")); - Telemetry::Accumulate(Telemetry::URLCLASSIFIER_UPDATE_ERROR_TYPE, - CHECKSUM_MISMATCH); return NS_ERROR_FAILURE; } diff --git a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp index 2ad8b6b515..3cf24847ed 100644 --- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp +++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp @@ -37,7 +37,6 @@ #include "mozilla/Mutex.h" #include "mozilla/Preferences.h" #include "mozilla/TimeStamp.h" -#include "mozilla/Telemetry.h" #include "mozilla/Logging.h" #include "prprf.h" #include "prnetdb.h" @@ -320,9 +319,6 @@ nsUrlClassifierDBServiceWorker::HandlePendingLookups() MutexAutoUnlock unlock(mPendingLookupLock); DoLookup(lookup.mKey, lookup.mTables, lookup.mCallback); } - double lookupTime = (TimeStamp::Now() - lookup.mStartTime).ToMilliseconds(); - Telemetry::Accumulate(Telemetry::URLCLASSIFIER_LOOKUP_TIME, - static_cast<uint32_t>(lookupTime)); } return NS_OK; diff --git a/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp b/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp index 554bff3422..e230f69518 100644 --- a/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp +++ b/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp @@ -646,9 +646,6 @@ nsUrlClassifierStreamUpdater::OnStartRequest(nsIRequest *request, if (NS_FAILED(status)) { // Assume we're overloading the server and trigger backoff. downloadError = true; - mozilla::Telemetry::Accumulate(mozilla::Telemetry::URLCLASSIFIER_UPDATE_REMOTE_STATUS, - 15 /* unknown response code */); - } else { bool succeeded = false; rv = httpChannel->GetRequestSucceeded(&succeeded); @@ -657,8 +654,6 @@ nsUrlClassifierStreamUpdater::OnStartRequest(nsIRequest *request, uint32_t requestStatus; rv = httpChannel->GetResponseStatus(&requestStatus); NS_ENSURE_SUCCESS(rv, rv); - mozilla::Telemetry::Accumulate(mozilla::Telemetry::URLCLASSIFIER_UPDATE_REMOTE_STATUS, - HTTPStatusToBucket(requestStatus)); LOG(("nsUrlClassifierStreamUpdater::OnStartRequest %s (%d)", succeeded ? "succeeded" : "failed", requestStatus)); if (!succeeded) { diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 40f9ead790..59a72c4321 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -4338,11 +4338,6 @@ mozilla::BrowserTabsRemoteAutostart() gBrowserTabsRemoteStatus = status; - mozilla::Telemetry::Accumulate(mozilla::Telemetry::E10S_STATUS, status); - if (prefEnabled) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::E10S_BLOCKED_FROM_RUNNING, - !gBrowserTabsRemoteAutostart); - } return gBrowserTabsRemoteAutostart; } diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp index d904cb83a9..2656524775 100644 --- a/toolkit/xre/nsXREDirProvider.cpp +++ b/toolkit/xre/nsXREDirProvider.cpp @@ -953,27 +953,6 @@ nsXREDirProvider::DoStartup() else mode = 2; } - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SAFE_MODE_USAGE, mode); - - // Telemetry about number of profiles. - nsCOMPtr<nsIToolkitProfileService> profileService = - do_GetService("@mozilla.org/toolkit/profile-service;1"); - if (profileService) { - nsCOMPtr<nsISimpleEnumerator> profiles; - rv = profileService->GetProfiles(getter_AddRefs(profiles)); - if (NS_WARN_IF(NS_FAILED(rv))) { - return rv; - } - - uint32_t count = 0; - nsCOMPtr<nsISupports> profile; - while (NS_SUCCEEDED(profiles->GetNext(getter_AddRefs(profile)))) { - ++count; - } - - mozilla::Telemetry::Accumulate(mozilla::Telemetry::NUMBER_OF_PROFILES, - count); - } obsSvc->NotifyObservers(nullptr, "profile-initial-state", nullptr); } diff --git a/widget/android/fennec/Telemetry.h b/widget/android/fennec/Telemetry.h index c727354969..458889ef06 100644 --- a/widget/android/fennec/Telemetry.h +++ b/widget/android/fennec/Telemetry.h @@ -44,7 +44,6 @@ public: AddHistogram(jni::String::Param aName, int32_t aValue) { MOZ_ASSERT(aName); - mozilla::Telemetry::Accumulate(aName->ToCString().get(), aValue); } static void @@ -52,8 +51,6 @@ public: int32_t aValue) { MOZ_ASSERT(aName && aKey); - mozilla::Telemetry::Accumulate(aName->ToCString().get(), - aKey->ToCString(), aValue); } static void diff --git a/widget/windows/nsLookAndFeel.cpp b/widget/windows/nsLookAndFeel.cpp index 97f81abfdb..a907622d9e 100644 --- a/widget/windows/nsLookAndFeel.cpp +++ b/widget/windows/nsLookAndFeel.cpp @@ -11,7 +11,6 @@ #include "nsUXThemeConstants.h" #include "gfxFont.h" #include "WinUtils.h" -#include "mozilla/Telemetry.h" #include "mozilla/WindowsVersion.h" #include "gfxFontConstants.h" @@ -65,8 +64,6 @@ nsLookAndFeel::nsLookAndFeel() : nsXPLookAndFeel() , mUseAccessibilityTheme(0) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::TOUCH_ENABLED_DEVICE, - WinUtils::IsTouchDeviceSupportPresent()); } nsLookAndFeel::~nsLookAndFeel() diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index 5ce0117b04..122d186860 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -4232,10 +4232,6 @@ nsWindow::DispatchMouseEvent(EventMessage aEventMessage, WPARAM wParam, } if (WinUtils::GetIsMouseFromTouch(aEventMessage)) { - if (aEventMessage == eMouseDown) { - Telemetry::Accumulate(Telemetry::FX_TOUCH_USED, 1); - } - if (mTouchWindow) { // If mTouchWindow is true, then we must have APZ enabled and be // feeding it raw touch events. In that case we don't need to @@ -6750,8 +6746,6 @@ bool nsWindow::OnGesture(WPARAM wParam, LPARAM lParam) bool endFeedback = true; if (mGesture.PanDeltaToPixelScroll(wheelEvent)) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS, - (uint32_t) ScrollInputMethod::MainThreadTouch); DispatchEvent(&wheelEvent, status); } diff --git a/xpcom/base/CycleCollectedJSContext.cpp b/xpcom/base/CycleCollectedJSContext.cpp index 4af8fe4dd0..02fc1aa4ca 100644 --- a/xpcom/base/CycleCollectedJSContext.cpp +++ b/xpcom/base/CycleCollectedJSContext.cpp @@ -1547,9 +1547,6 @@ IncrementalFinalizeRunnable::Run() } } - uint32_t duration = (uint32_t)((TimeStamp::Now() - start).ToMilliseconds()); - Telemetry::Accumulate(Telemetry::DEFERRED_FINALIZE_ASYNC, duration); - return NS_OK; } diff --git a/xpcom/base/nsCycleCollector.cpp b/xpcom/base/nsCycleCollector.cpp index b2c15a1dd4..a349e086d2 100644 --- a/xpcom/base/nsCycleCollector.cpp +++ b/xpcom/base/nsCycleCollector.cpp @@ -528,15 +528,6 @@ public: #define CC_GRAPH_ASSERT(b) #endif -#define CC_TELEMETRY(_name, _value) \ - PR_BEGIN_MACRO \ - if (NS_IsMainThread()) { \ - Telemetry::Accumulate(Telemetry::CYCLE_COLLECTOR##_name, _value); \ - } else { \ - Telemetry::Accumulate(Telemetry::CYCLE_COLLECTOR_WORKER##_name, _value); \ - } \ - PR_END_MACRO - enum NodeColor { black, white, grey }; // This structure should be kept as small as possible; we may expect @@ -2966,7 +2957,6 @@ nsCycleCollector::ScanWeakMaps() if (failed) { MOZ_ASSERT(false, "Ran out of memory in ScanWeakMaps"); - CC_TELEMETRY(_OOM, true); } } @@ -3109,7 +3099,6 @@ nsCycleCollector::ScanIncrementalRoots() if (failed) { NS_ASSERTION(false, "Ran out of memory in ScanIncrementalRoots"); - CC_TELEMETRY(_OOM, true); } } @@ -3171,7 +3160,6 @@ nsCycleCollector::ScanBlackNodes() if (failed) { NS_ASSERTION(false, "Ran out of memory in ScanBlackNodes"); - CC_TELEMETRY(_OOM, true); } } @@ -3501,7 +3489,6 @@ nsCycleCollector::FixGrayBits(bool aForceGC, TimeLog& aTimeLog) bool needGC = !mJSContext->AreGCGrayBitsValid(); // Only do a telemetry ping for non-shutdown CCs. - CC_TELEMETRY(_NEED_GC, needGC); if (!needGC) { return; } @@ -3553,10 +3540,6 @@ nsCycleCollector::CleanupAfterCollection() printf(".\ncc: \n"); #endif - CC_TELEMETRY( , interval); - CC_TELEMETRY(_VISITED_REF_COUNTED, mResults.mVisitedRefCounted); - CC_TELEMETRY(_VISITED_GCED, mResults.mVisitedGCed); - CC_TELEMETRY(_COLLECTED, mWhiteNodeCount); timeLog.Checkpoint("CleanupAfterCollection::telemetry"); if (mJSContext) { diff --git a/xpcom/threads/HangMonitor.cpp b/xpcom/threads/HangMonitor.cpp index 6def6ed617..8003ef515a 100644 --- a/xpcom/threads/HangMonitor.cpp +++ b/xpcom/threads/HangMonitor.cpp @@ -249,8 +249,6 @@ NotifyActivity(ActivityType aActivityType) // If we have UI activity we should reset the timer and report it if (aActivityType == kUIActivity) { - mozilla::Telemetry::Accumulate(mozilla::Telemetry::EVENTLOOP_UI_ACTIVITY_EXP_MS, - cumulativeUILagMS); cumulativeUILagMS = 0; } |