#334: remove telemetry from xpcom

This commit is contained in:
Cameron Kaiser 2017-09-01 22:34:31 -07:00
parent 19a2166287
commit 71b8c3d256
4 changed files with 4 additions and 24 deletions

View File

@ -60,7 +60,6 @@
#include "mozilla/AutoRestore.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/Snprintf.h"
#include "mozilla/Telemetry.h"
#include "mozilla/DebuggerOnGCRunnable.h"
#include "mozilla/dom/DOMJSClass.h"
#include "mozilla/dom/Promise.h"
@ -1241,7 +1240,6 @@ IncrementalFinalizeRunnable::Run()
}
uint32_t duration = (uint32_t)((TimeStamp::Now() - start).ToMilliseconds());
Telemetry::Accumulate(Telemetry::DEFERRED_FINALIZE_ASYNC, duration);
return NS_OK;
}

View File

@ -185,7 +185,6 @@
#include "mozilla/AutoGlobalTimelineMarker.h"
#include "mozilla/Likely.h"
#include "mozilla/PoisonIOInterposer.h"
#include "mozilla/Telemetry.h"
#include "mozilla/ThreadLocal.h"
using namespace mozilla;
@ -528,15 +527,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
@ -2951,7 +2941,6 @@ nsCycleCollector::ScanWeakMaps()
if (failed) {
MOZ_ASSERT(false, "Ran out of memory in ScanWeakMaps");
CC_TELEMETRY(_OOM, true);
}
}
@ -3094,7 +3083,6 @@ nsCycleCollector::ScanIncrementalRoots()
if (failed) {
NS_ASSERTION(false, "Ran out of memory in ScanIncrementalRoots");
CC_TELEMETRY(_OOM, true);
}
}
@ -3155,7 +3143,6 @@ nsCycleCollector::ScanBlackNodes()
if (failed) {
NS_ASSERTION(false, "Ran out of memory in ScanBlackNodes");
CC_TELEMETRY(_OOM, true);
}
}
@ -3480,7 +3467,6 @@ nsCycleCollector::FixGrayBits(bool aForceGC, TimeLog& aTimeLog)
bool needGC = !mJSRuntime->AreGCGrayBitsValid();
// Only do a telemetry ping for non-shutdown CCs.
CC_TELEMETRY(_NEED_GC, needGC);
if (!needGC) {
return;
}
@ -3532,12 +3518,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 (mJSRuntime) {
mJSRuntime->FinalizeDeferredThings(mResults.mAnyManual
? CycleCollectedJSRuntime::FinalizeNow

View File

@ -26,7 +26,6 @@
#include "mozilla/Preferences.h"
#include "mozilla/Scoped.h"
#include "mozilla/Services.h"
#include "mozilla/Telemetry.h"
#include "mozilla/dom/PMemoryReportRequestParent.h" // for dom::MemoryReport
#include "mozilla/dom/ContentParent.h"
#include "mozilla/ipc/FileDescriptorUtils.h"
@ -439,7 +438,6 @@ ResidentDistinguishedAmountHelper(int64_t* aN, bool aDoPurge)
#ifdef HAVE_JEMALLOC_STATS
#ifndef MOZ_JEMALLOC4
if (aDoPurge) {
Telemetry::AutoTimer<Telemetry::MEMORY_FREE_PURGED_PAGES_MS> timer;
jemalloc_purge_freed_pages();
}
#endif

View File

@ -214,6 +214,9 @@ BackgroundHangManager::BackgroundHangManager()
, mLock("BackgroundHangManager")
, mIntervalNow(0)
{
#if(0)
// The BackgroundHangMonitor is irrelevant in TenFourFox since we don't
// have telemetry or anything useful to collect from it.
// Lock so we don't race against the new monitor thread
MonitorAutoLock autoLock(mLock);
mHangMonitorThread = PR_CreateThread(
@ -221,6 +224,7 @@ BackgroundHangManager::BackgroundHangManager()
PR_PRIORITY_LOW, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 0);
MOZ_ASSERT(mHangMonitorThread, "Failed to create monitor thread");
#endif
}
BackgroundHangManager::~BackgroundHangManager()