summaryrefslogtreecommitdiff
path: root/netwerk
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-10-29 11:02:27 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-02 14:39:54 +0200
commitee86d3eb9c468edbb81550d27114ed66b3d71ee5 (patch)
treea00ffa052ffb8d072203938f595548dcd3b2e0ed /netwerk
parentd0acadd727468ccaa4e3cbe3673e29890c2551ca (diff)
downloaduxp-ee86d3eb9c468edbb81550d27114ed66b3d71ee5.tar.gz
Issue #21 - Remove Telemetry plumbing and fix build.
Note this won't give working applications. Requires FE changes and additional js module changes (next part).
Diffstat (limited to 'netwerk')
-rw-r--r--netwerk/base/Predictor.cpp18
-rw-r--r--netwerk/base/nsNetUtil.cpp2
-rw-r--r--netwerk/cache/nsCacheService.h2
-rw-r--r--netwerk/cache/nsCacheUtils.cpp1
-rw-r--r--netwerk/cache/nsDeleteDir.cpp2
-rw-r--r--netwerk/cache/nsDiskCacheDevice.cpp1
-rw-r--r--netwerk/cache/nsDiskCacheDeviceSQL.cpp3
-rw-r--r--netwerk/cache/nsDiskCacheMap.cpp11
-rw-r--r--netwerk/cache/nsDiskCacheStreams.cpp1
-rw-r--r--netwerk/cache/nsMemoryCacheDevice.cpp1
-rw-r--r--netwerk/cache2/CacheEntry.cpp8
-rw-r--r--netwerk/cache2/CacheEntry.h3
-rw-r--r--netwerk/protocol/http/ASpdySession.cpp2
-rw-r--r--netwerk/protocol/http/ASpdySession.h2
-rw-r--r--netwerk/protocol/http/Http2Compression.h9
-rw-r--r--netwerk/protocol/http/Http2Session.cpp3
-rw-r--r--netwerk/protocol/http/Http2Session.h3
-rw-r--r--netwerk/protocol/http/nsHttpChannel.cpp2
-rw-r--r--netwerk/protocol/http/nsHttpChannel.h1
-rw-r--r--netwerk/protocol/http/nsHttpChannelAuthProvider.cpp2
20 files changed, 4 insertions, 73 deletions
diff --git a/netwerk/base/Predictor.cpp b/netwerk/base/Predictor.cpp
index d892e5eeca..1b2020f5db 100644
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -38,7 +38,6 @@
#include "mozilla/Logging.h"
#include "mozilla/Preferences.h"
-#include "mozilla/Telemetry.h"
#include "mozilla/net/NeckoCommon.h"
#include "mozilla/net/NeckoParent.h"
@@ -1079,9 +1078,6 @@ Predictor::CalculateConfidence(uint32_t hitCount, uint32_t hitsPossible,
{
MOZ_ASSERT(NS_IsMainThread());
- Telemetry::AutoCounter<Telemetry::PREDICTOR_PREDICTIONS_CALCULATED> predictionsCalculated;
- ++predictionsCalculated;
-
if (!hitsPossible) {
return 0;
}
@@ -1316,18 +1312,11 @@ Predictor::RunPredictions(nsIURI *referrer, nsINetworkPredictorVerifier *verifie
preconnects.SwapElements(mPreconnects);
preresolves.SwapElements(mPreresolves);
- Telemetry::AutoCounter<Telemetry::PREDICTOR_TOTAL_PREDICTIONS> totalPredictions;
- Telemetry::AutoCounter<Telemetry::PREDICTOR_TOTAL_PREFETCHES> totalPrefetches;
- Telemetry::AutoCounter<Telemetry::PREDICTOR_TOTAL_PRECONNECTS> totalPreconnects;
- Telemetry::AutoCounter<Telemetry::PREDICTOR_TOTAL_PRERESOLVES> totalPreresolves;
-
len = prefetches.Length();
for (i = 0; i < len; ++i) {
PREDICTOR_LOG((" doing prefetch"));
nsCOMPtr<nsIURI> uri = prefetches[i];
if (NS_SUCCEEDED(Prefetch(uri, referrer, verifier))) {
- ++totalPredictions;
- ++totalPrefetches;
predicted = true;
}
}
@@ -1336,8 +1325,6 @@ Predictor::RunPredictions(nsIURI *referrer, nsINetworkPredictorVerifier *verifie
for (i = 0; i < len; ++i) {
PREDICTOR_LOG((" doing preconnect"));
nsCOMPtr<nsIURI> uri = preconnects[i];
- ++totalPredictions;
- ++totalPreconnects;
mSpeculativeService->SpeculativeConnect2(uri, nullptr, this);
predicted = true;
if (verifier) {
@@ -1350,8 +1337,6 @@ Predictor::RunPredictions(nsIURI *referrer, nsINetworkPredictorVerifier *verifie
nsCOMPtr<nsIThread> mainThread = do_GetMainThread();
for (i = 0; i < len; ++i) {
nsCOMPtr<nsIURI> uri = preresolves[i];
- ++totalPredictions;
- ++totalPreresolves;
nsAutoCString hostname;
uri->GetAsciiHost(hostname);
PREDICTOR_LOG((" doing preresolve %s", hostname.get()));
@@ -1482,9 +1467,6 @@ Predictor::Learn(nsIURI *targetURI, nsIURI *sourceURI,
return NS_ERROR_INVALID_ARG;
}
- Telemetry::AutoCounter<Telemetry::PREDICTOR_LEARN_ATTEMPTS> learnAttempts;
- ++learnAttempts;
-
Predictor::Reason argReason;
argReason.mLearn = reason;
diff --git a/netwerk/base/nsNetUtil.cpp b/netwerk/base/nsNetUtil.cpp
index ce0e2d4efe..ac6f620336 100644
--- a/netwerk/base/nsNetUtil.cpp
+++ b/netwerk/base/nsNetUtil.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim:set ts=4 sw=4 sts=4 et cin: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -11,7 +10,6 @@
#include "mozilla/LoadInfo.h"
#include "mozilla/BasePrincipal.h"
#include "mozilla/Preferences.h"
-#include "mozilla/Telemetry.h"
#include "nsNetUtil.h"
#include "nsNetUtilInlines.h"
#include "mozIApplicationClearPrivateDataParams.h"
diff --git a/netwerk/cache/nsCacheService.h b/netwerk/cache/nsCacheService.h
index 7def90066a..bc4731b1ec 100644
--- a/netwerk/cache/nsCacheService.h
+++ b/netwerk/cache/nsCacheService.h
@@ -21,7 +21,6 @@
#include "nsRefPtrHashtable.h"
#include "mozilla/CondVar.h"
#include "mozilla/Mutex.h"
-#include "mozilla/Telemetry.h"
class nsCacheRequest;
class nsCacheProfilePrefObserver;
@@ -254,7 +253,6 @@ private:
*/
static void Lock();
- static void Lock(::mozilla::Telemetry::ID mainThreadLockerID);
static void Unlock();
void LockAcquired();
void LockReleased();
diff --git a/netwerk/cache/nsCacheUtils.cpp b/netwerk/cache/nsCacheUtils.cpp
index 7cb5622747..aa85e3158e 100644
--- a/netwerk/cache/nsCacheUtils.cpp
+++ b/netwerk/cache/nsCacheUtils.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
diff --git a/netwerk/cache/nsDeleteDir.cpp b/netwerk/cache/nsDeleteDir.cpp
index b081a12eb1..108f765798 100644
--- a/netwerk/cache/nsDeleteDir.cpp
+++ b/netwerk/cache/nsDeleteDir.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -7,7 +6,6 @@
#include "nsDeleteDir.h"
#include "nsIFile.h"
#include "nsString.h"
-#include "mozilla/Telemetry.h"
#include "nsITimer.h"
#include "nsISimpleEnumerator.h"
#include "nsAutoPtr.h"
diff --git a/netwerk/cache/nsDiskCacheDevice.cpp b/netwerk/cache/nsDiskCacheDevice.cpp
index 09089bfb62..05bd6e06f2 100644
--- a/netwerk/cache/nsDiskCacheDevice.cpp
+++ b/netwerk/cache/nsDiskCacheDevice.cpp
@@ -45,7 +45,6 @@
#include "nsThreadUtils.h"
#include "mozilla/MemoryReporting.h"
-#include "mozilla/Telemetry.h"
static const char DISK_CACHE_DEVICE_ID[] = { "disk" };
using namespace mozilla;
diff --git a/netwerk/cache/nsDiskCacheDeviceSQL.cpp b/netwerk/cache/nsDiskCacheDeviceSQL.cpp
index 69cc151308..297c0f362a 100644
--- a/netwerk/cache/nsDiskCacheDeviceSQL.cpp
+++ b/netwerk/cache/nsDiskCacheDeviceSQL.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et cin: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -46,8 +45,6 @@
#include "nsICacheVisitor.h"
#include "nsISeekableStream.h"
-#include "mozilla/Telemetry.h"
-
#include "sqlite3.h"
#include "mozilla/storage.h"
#include "nsVariant.h"
diff --git a/netwerk/cache/nsDiskCacheMap.cpp b/netwerk/cache/nsDiskCacheMap.cpp
index d3ec1e714b..a69d3f816c 100644
--- a/netwerk/cache/nsDiskCacheMap.cpp
+++ b/netwerk/cache/nsDiskCacheMap.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim:set ts=4 sw=4 sts=4 cin et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1243,8 +1242,7 @@ nsDiskCacheMap::InitCacheClean(nsIFile * cacheDirectory,
rv = cacheCleanFile->AppendNative(
NS_LITERAL_CSTRING("_CACHE_CLEAN_"));
if (NS_SUCCEEDED(rv)) {
- // Check if the file already exists, if it does, we will later read the
- // value and report it to telemetry.
+ // Check if the file already exists.
cacheCleanFile->Exists(&cacheCleanFileExists);
}
}
@@ -1406,14 +1404,9 @@ nsDiskCacheMap::RevalidateCache()
"cache not in a safe state\n"));
// Normally we would return an error here, but there is a bug where
// the doom list sometimes gets an entry 'stuck' and doens't clear it
- // until browser shutdown. So we allow revalidation for the time being
- // to get proper telemetry data of how much the cache corruption plan
- // would help.
+ // until browser shutdown. So we allow revalidation for the time being.
}
- // If telemetry data shows it is worth it, we'll be flushing headers and
- // records before flushing the clean cache file.
-
// Write out the _CACHE_CLEAN_ file with '1'
rv = WriteCacheClean(true);
if (NS_FAILED(rv)) {
diff --git a/netwerk/cache/nsDiskCacheStreams.cpp b/netwerk/cache/nsDiskCacheStreams.cpp
index d58cca7fd8..c6c34704a6 100644
--- a/netwerk/cache/nsDiskCacheStreams.cpp
+++ b/netwerk/cache/nsDiskCacheStreams.cpp
@@ -13,7 +13,6 @@
#include "mozilla/FileUtils.h"
#include "nsThreadUtils.h"
#include "mozilla/MemoryReporting.h"
-#include "mozilla/Telemetry.h"
#include "mozilla/TimeStamp.h"
#include <algorithm>
diff --git a/netwerk/cache/nsMemoryCacheDevice.cpp b/netwerk/cache/nsMemoryCacheDevice.cpp
index 42a5ff29e9..b50d25b7e7 100644
--- a/netwerk/cache/nsMemoryCacheDevice.cpp
+++ b/netwerk/cache/nsMemoryCacheDevice.cpp
@@ -12,7 +12,6 @@
#include "nsCRT.h"
#include "nsReadableUtils.h"
#include "mozilla/MathAlgorithms.h"
-#include "mozilla/Telemetry.h"
#include <algorithm>
// The memory cache implements the "LRU-SP" caching algorithm
diff --git a/netwerk/cache2/CacheEntry.cpp b/netwerk/cache2/CacheEntry.cpp
index 51e441aa73..440dd542a8 100644
--- a/netwerk/cache2/CacheEntry.cpp
+++ b/netwerk/cache2/CacheEntry.cpp
@@ -25,7 +25,6 @@
#include "nsProxyRelease.h"
#include "nsSerializationHelper.h"
#include "nsThreadUtils.h"
-#include "mozilla/Telemetry.h"
#include <math.h>
#include <algorithm>
@@ -408,12 +407,7 @@ bool CacheEntry::Load(bool aTruncate, bool aPriority)
bool directLoad = aTruncate || !mUseDisk;
if (directLoad) {
- // mLoadStart will be used to calculate telemetry of life-time of this entry.
- // Low resulution is then enough.
- mLoadStart = TimeStamp::NowLoRes();
mPinningKnown = true;
- } else {
- mLoadStart = TimeStamp::Now();
}
{
@@ -451,8 +445,6 @@ NS_IMETHODIMP CacheEntry::OnFileReady(nsresult aResult, bool aIsNew)
LOG(("CacheEntry::OnFileReady [this=%p, rv=0x%08x, new=%d]",
this, aResult, aIsNew));
- MOZ_ASSERT(!mLoadStart.IsNull());
-
// OnFileReady, that is the only code that can transit from LOADING
// to any follow-on state and can only be invoked ones on an entry.
// Until this moment there is no consumer that could manipulate
diff --git a/netwerk/cache2/CacheEntry.h b/netwerk/cache2/CacheEntry.h
index 7331be2a4f..4590fbbeee 100644
--- a/netwerk/cache2/CacheEntry.h
+++ b/netwerk/cache2/CacheEntry.h
@@ -88,8 +88,6 @@ public:
bool CanRegister() const;
void SetRegistered(bool aRegistered);
- TimeStamp const& LoadStart() const { return mLoadStart; }
-
enum EPurge {
PURGE_DATA_ONLY_DISK_BACKED,
PURGE_WHOLE_ONLY_DISK_BACKED,
@@ -376,7 +374,6 @@ private:
nsCOMPtr<nsISupports> mSecurityInfo;
int64_t mPredictedDataSize;
- mozilla::TimeStamp mLoadStart;
uint32_t mUseCount;
};
diff --git a/netwerk/protocol/http/ASpdySession.cpp b/netwerk/protocol/http/ASpdySession.cpp
index e57e0354b2..1417ccbdcb 100644
--- a/netwerk/protocol/http/ASpdySession.cpp
+++ b/netwerk/protocol/http/ASpdySession.cpp
@@ -18,8 +18,6 @@
#include "Http2Push.h"
#include "Http2Session.h"
-#include "mozilla/Telemetry.h"
-
namespace mozilla {
namespace net {
diff --git a/netwerk/protocol/http/ASpdySession.h b/netwerk/protocol/http/ASpdySession.h
index a3db61d15e..68cf87c7c2 100644
--- a/netwerk/protocol/http/ASpdySession.h
+++ b/netwerk/protocol/http/ASpdySession.h
@@ -105,7 +105,7 @@ public:
// determine if a version of the protocol is enabled for index < kCount
bool ProtocolEnabled(uint32_t index) const;
- uint8_t Version[kCount]; // telemetry enum e.g. SPDY_VERSION_31
+ uint8_t Version[kCount]; // enum e.g. SPDY_VERSION_31
nsCString VersionString[kCount]; // npn string e.g. "spdy/3.1"
// the ALPNCallback function allows the protocol stack to decide whether or
diff --git a/netwerk/protocol/http/Http2Compression.h b/netwerk/protocol/http/Http2Compression.h
index 0fb391bf73..ba90403b6b 100644
--- a/netwerk/protocol/http/Http2Compression.h
+++ b/netwerk/protocol/http/Http2Compression.h
@@ -13,7 +13,6 @@
#include "nsDeque.h"
#include "nsString.h"
#include "nsIMemoryReporter.h"
-#include "mozilla/Telemetry.h"
namespace mozilla {
namespace net {
@@ -85,10 +84,6 @@ protected:
uint32_t mPeakSize;
uint32_t mPeakCount;
- MOZ_INIT_OUTSIDE_CTOR
- Telemetry::ID mPeakSizeID;
- MOZ_INIT_OUTSIDE_CTOR
- Telemetry::ID mPeakCountID;
private:
RefPtr<HpackDynamicTableReporter> mDynamicReporter;
@@ -101,8 +96,6 @@ class Http2Decompressor final : public Http2BaseCompressor
public:
Http2Decompressor()
{
- mPeakSizeID = Telemetry::HPACK_PEAK_SIZE_DECOMPRESSOR;
- mPeakCountID = Telemetry::HPACK_PEAK_COUNT_DECOMPRESSOR;
};
virtual ~Http2Decompressor() { } ;
@@ -159,8 +152,6 @@ public:
mBufferSizeChangeWaiting(false),
mLowestBufferSizeWaiting(0)
{
- mPeakSizeID = Telemetry::HPACK_PEAK_SIZE_COMPRESSOR;
- mPeakCountID = Telemetry::HPACK_PEAK_COUNT_COMPRESSOR;
};
virtual ~Http2Compressor() { }
diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp
index 30670895ad..805ea09038 100644
--- a/netwerk/protocol/http/Http2Session.cpp
+++ b/netwerk/protocol/http/Http2Session.cpp
@@ -19,7 +19,6 @@
#include "Http2Push.h"
#include "mozilla/EndianUtils.h"
-#include "mozilla/Telemetry.h"
#include "mozilla/Preferences.h"
#include "nsHttp.h"
#include "nsHttpHandler.h"
@@ -97,7 +96,6 @@ Http2Session::Http2Session(nsISocketTransport *aSocketTransport, uint32_t versio
, mGoAwayID(0)
, mOutgoingGoAwayID(0)
, mConcurrent(0)
- , mServerPushedResources(0)
, mServerInitialStreamWindow(kDefaultRwin)
, mLocalSessionWindow(kDefaultRwin)
, mServerSessionWindow(kDefaultRwin)
@@ -1628,7 +1626,6 @@ Http2Session::RecvPushPromise(Http2Session *self)
return rv;
Http2Stream *associatedStream = self->mInputFrameDataStream;
- ++(self->mServerPushedResources);
// Anytime we start using the high bit of stream ID (either client or server)
// begin to migrate to a new session.
diff --git a/netwerk/protocol/http/Http2Session.h b/netwerk/protocol/http/Http2Session.h
index b4ddeb5ec7..d9a3c2b72b 100644
--- a/netwerk/protocol/http/Http2Session.h
+++ b/netwerk/protocol/http/Http2Session.h
@@ -441,9 +441,6 @@ private:
// below the current value
uint32_t mConcurrent;
- // The number of server initiated promises, tracked for telemetry
- uint32_t mServerPushedResources;
-
// The server rwin for new streams as determined from a SETTINGS frame
uint32_t mServerInitialStreamWindow;
diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp
index 16d31a8fc9..3a197efe4e 100644
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -6525,7 +6525,7 @@ nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult st
mTransferSize = mTransaction->GetTransferSize();
// If we are using the transaction to serve content, we also save the
- // time since async open in the cache entry so we can compare telemetry
+ // time since async open in the cache entry so we can compare time
// between cache and net response.
if (request == mTransactionPump && mCacheEntry &&
!mAsyncOpenTime.IsNull() && !mOnStartRequestTimestamp.IsNull()) {
diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h
index 76cffe8670..6e0680178c 100644
--- a/netwerk/protocol/http/nsHttpChannel.h
+++ b/netwerk/protocol/http/nsHttpChannel.h
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim:set et cin ts=4 sw=4 sts=4: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
diff --git a/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp b/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
index 1b25afe641..316a8ae80d 100644
--- a/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
+++ b/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim:set expandtab ts=4 sw=4 sts=4 cin: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -28,7 +27,6 @@
#include "nsServiceManagerUtils.h"
#include "nsILoadContext.h"
#include "nsIURL.h"
-#include "mozilla/Telemetry.h"
#include "nsIProxiedChannel.h"
#include "nsIProxyInfo.h"