summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-29 23:55:49 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-29 23:55:49 +0200
commit3343a4b4744b6c78d1f3d0c3f111e1adfddc18a5 (patch)
tree1cbff60940f1b9174d10b1ccbe526ba94b3cd0a8
parent81b341a9b37acae2b60e0334a9b0846bc5be8445 (diff)
downloadUXP-3343a4b4744b6c78d1f3d0c3f111e1adfddc18a5.tar
UXP-3343a4b4744b6c78d1f3d0c3f111e1adfddc18a5.tar.gz
UXP-3343a4b4744b6c78d1f3d0c3f111e1adfddc18a5.tar.lz
UXP-3343a4b4744b6c78d1f3d0c3f111e1adfddc18a5.tar.xz
UXP-3343a4b4744b6c78d1f3d0c3f111e1adfddc18a5.zip
Remove telemetry probes for cache file system.
-rw-r--r--netwerk/cache2/CacheFileIOManager.cpp48
-rw-r--r--netwerk/cache2/CacheObserver.cpp29
-rw-r--r--netwerk/cache2/CacheObserver.h5
-rw-r--r--toolkit/components/telemetry/Histograms.json13
-rw-r--r--toolkit/components/telemetry/histogram-whitelists.json4
5 files changed, 0 insertions, 99 deletions
diff --git a/netwerk/cache2/CacheFileIOManager.cpp b/netwerk/cache2/CacheFileIOManager.cpp
index f6b499e47..25e621d12 100644
--- a/netwerk/cache2/CacheFileIOManager.cpp
+++ b/netwerk/cache2/CacheFileIOManager.cpp
@@ -3822,44 +3822,6 @@ CacheFileIOManager::CreateCacheTree()
StartRemovingTrash();
- if (!CacheObserver::CacheFSReported()) {
- uint32_t fsType = 4; // Other OS
-
-#ifdef XP_WIN
- nsAutoString target;
- nsresult rv = mCacheDirectory->GetTarget(target);
- if (NS_FAILED(rv)) {
- return NS_OK;
- }
-
- wchar_t volume_path[MAX_PATH + 1] = { 0 };
- if (!::GetVolumePathNameW(target.get(),
- volume_path,
- mozilla::ArrayLength(volume_path))) {
- return NS_OK;
- }
-
- wchar_t fsName[6] = { 0 };
- if (!::GetVolumeInformationW(volume_path, nullptr, 0, nullptr, nullptr,
- nullptr, fsName,
- mozilla::ArrayLength(fsName))) {
- return NS_OK;
- }
-
- if (wcscmp(fsName, L"NTFS") == 0) {
- fsType = 0;
- } else if (wcscmp(fsName, L"FAT32") == 0) {
- fsType = 1;
- } else if (wcscmp(fsName, L"FAT") == 0) {
- fsType = 2;
- } else {
- fsType = 3;
- }
-#endif
-
- CacheObserver::SetCacheFSReported();
- }
-
return NS_OK;
}
@@ -3905,16 +3867,6 @@ CacheFileIOManager::OpenNSPRHandle(CacheFileHandle *aHandle, bool aCreate)
LOG(("CacheFileIOManager::OpenNSPRHandle() - Successfully evicted entry"
" with hash %08x%08x%08x%08x%08x. %s to create the new file.",
LOGSHA1(&hash), NS_SUCCEEDED(rv) ? "Succeeded" : "Failed"));
-
- // Report the full size only once per session
- static bool sSizeReported = false;
- if (!sSizeReported) {
- uint32_t cacheUsage;
- if (NS_SUCCEEDED(CacheIndex::GetCacheSize(&cacheUsage))) {
- cacheUsage >>= 10;
- sSizeReported = true;
- }
- }
} else {
LOG(("CacheFileIOManager::OpenNSPRHandle() - Couldn't evict an existing"
" entry."));
diff --git a/netwerk/cache2/CacheObserver.cpp b/netwerk/cache2/CacheObserver.cpp
index 51afaf3a1..32e0dff95 100644
--- a/netwerk/cache2/CacheObserver.cpp
+++ b/netwerk/cache2/CacheObserver.cpp
@@ -86,9 +86,6 @@ bool CacheObserver::sSanitizeOnShutdown = kDefaultSanitizeOnShutdown;
static bool kDefaultClearCacheOnShutdown = false;
bool CacheObserver::sClearCacheOnShutdown = kDefaultClearCacheOnShutdown;
-static bool kDefaultCacheFSReported = false;
-bool CacheObserver::sCacheFSReported = kDefaultCacheFSReported;
-
static uint32_t const kDefaultMaxShutdownIOLag = 2; // seconds
Atomic<uint32_t, Relaxed> CacheObserver::sMaxShutdownIOLag(kDefaultMaxShutdownIOLag);
@@ -328,32 +325,6 @@ CacheObserver::StoreDiskCacheCapacity()
}
// static
-void
-CacheObserver::SetCacheFSReported()
-{
- sCacheFSReported = true;
-
- if (!sSelf) {
- return;
- }
-
- if (NS_IsMainThread()) {
- sSelf->StoreCacheFSReported();
- } else {
- nsCOMPtr<nsIRunnable> event =
- NewRunnableMethod(sSelf, &CacheObserver::StoreCacheFSReported);
- NS_DispatchToMainThread(event);
- }
-}
-
-void
-CacheObserver::StoreCacheFSReported()
-{
- mozilla::Preferences::SetInt("browser.cache.disk.filesystem_reported",
- sCacheFSReported);
-}
-
-// static
void CacheObserver::ParentDirOverride(nsIFile** aDir)
{
if (NS_WARN_IF(!aDir))
diff --git a/netwerk/cache2/CacheObserver.h b/netwerk/cache2/CacheObserver.h
index ee989e4d8..ccdd89030 100644
--- a/netwerk/cache2/CacheObserver.h
+++ b/netwerk/cache2/CacheObserver.h
@@ -61,9 +61,6 @@ class CacheObserver : public nsIObserver
{ return sHalfLifeExperiment; }
static bool ClearCacheOnShutdown()
{ return sSanitizeOnShutdown && sClearCacheOnShutdown; }
- static bool CacheFSReported()
- { return sCacheFSReported; }
- static void SetCacheFSReported();
static void ParentDirOverride(nsIFile ** aDir);
static bool EntryIsTooBig(int64_t aSize, bool aUsingDisk);
@@ -79,7 +76,6 @@ private:
static CacheObserver* sSelf;
void StoreDiskCacheCapacity();
- void StoreCacheFSReported();
void AttachToPreferences();
static uint32_t sUseNewCache;
@@ -102,7 +98,6 @@ private:
static int32_t sHalfLifeExperiment;
static bool sSanitizeOnShutdown;
static bool sClearCacheOnShutdown;
- static bool sCacheFSReported;
static Atomic<uint32_t, Relaxed> sMaxShutdownIOLag;
static Atomic<PRIntervalTime> sShutdownDemandedTime;
diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json
index 9294a4d40..3c35e8791 100644
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -8426,19 +8426,6 @@
"n_values": 7,
"description": "Final status of the CacheFileInputStream (0=ok, 1=other error, 2=out of memory, 3=disk full, 4=file corrupted, 5=file not found, 6=binding aborted)"
},
- "NETWORK_CACHE_FS_TYPE": {
- "expires_in_version": "42",
- "kind": "enumerated",
- "n_values": 5,
- "description": "Type of FS that the cache is stored on (0=NTFS (Win), 1=FAT32 (Win), 2=FAT (Win), 3=other FS (Win), 4=other OS)"
- },
- "NETWORK_CACHE_SIZE_FULL_FAT": {
- "expires_in_version": "42",
- "kind": "linear",
- "high": 500,
- "n_buckets": 50,
- "description": "Size (in MB) of a cache that reached a file count limit"
- },
"NETWORK_CACHE_HIT_MISS_STAT_PER_CACHE_SIZE": {
"expires_in_version": "never",
"kind": "enumerated",
diff --git a/toolkit/components/telemetry/histogram-whitelists.json b/toolkit/components/telemetry/histogram-whitelists.json
index b883271ad..f3f50baf6 100644
--- a/toolkit/components/telemetry/histogram-whitelists.json
+++ b/toolkit/components/telemetry/histogram-whitelists.json
@@ -429,14 +429,12 @@
"MOZ_SQLITE_WEBAPPS_WRITE_B",
"MOZ_SQLITE_WEBAPPS_WRITE_MAIN_THREAD_MS",
"MOZ_SQLITE_WEBAPPS_WRITE_MS",
- "NETWORK_CACHE_FS_TYPE",
"NETWORK_CACHE_HIT_MISS_STAT_PER_CACHE_SIZE",
"NETWORK_CACHE_HIT_RATE_PER_CACHE_SIZE",
"NETWORK_CACHE_METADATA_FIRST_READ_SIZE",
"NETWORK_CACHE_METADATA_FIRST_READ_TIME_MS",
"NETWORK_CACHE_METADATA_SECOND_READ_TIME_MS",
"NETWORK_CACHE_METADATA_SIZE",
- "NETWORK_CACHE_SIZE_FULL_FAT",
"NETWORK_CACHE_V1_HIT_TIME_MS",
"NETWORK_CACHE_V1_MISS_TIME_MS",
"NETWORK_CACHE_V1_TRUNCATE_TIME_MS",
@@ -1275,14 +1273,12 @@
"MOZ_SQLITE_WEBAPPS_WRITE_MS",
"MOZ_STORAGE_ASYNC_REQUESTS_MS",
"MOZ_STORAGE_ASYNC_REQUESTS_SUCCESS",
- "NETWORK_CACHE_FS_TYPE",
"NETWORK_CACHE_HIT_MISS_STAT_PER_CACHE_SIZE",
"NETWORK_CACHE_HIT_RATE_PER_CACHE_SIZE",
"NETWORK_CACHE_METADATA_FIRST_READ_SIZE",
"NETWORK_CACHE_METADATA_FIRST_READ_TIME_MS",
"NETWORK_CACHE_METADATA_SECOND_READ_TIME_MS",
"NETWORK_CACHE_METADATA_SIZE",
- "NETWORK_CACHE_SIZE_FULL_FAT",
"NETWORK_CACHE_V1_HIT_TIME_MS",
"NETWORK_CACHE_V1_MISS_TIME_MS",
"NETWORK_CACHE_V1_TRUNCATE_TIME_MS",