mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Telemetry: Remove stubs and related code
This commit is contained in:
parent
10053448d6
commit
aea50f182f
134 changed files with 68 additions and 3422 deletions
|
|
@ -55,7 +55,6 @@
|
|||
#include "nsDocShell.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
#include "nsJSEnvironment.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include "BackgroundChild.h"
|
||||
#include "mozilla/ipc/PBackgroundChild.h"
|
||||
|
|
@ -524,46 +523,10 @@ private:
|
|||
private:
|
||||
~RefreshDriverVsyncObserver() = default;
|
||||
|
||||
void RecordTelemetryProbes(TimeStamp aVsyncTimestamp)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
#ifndef ANDROID /* bug 1142079 */
|
||||
if (XRE_IsParentProcess()) {
|
||||
TimeDuration vsyncLatency = TimeStamp::Now() - aVsyncTimestamp;
|
||||
uint32_t sample = (uint32_t)vsyncLatency.ToMilliseconds();
|
||||
RecordJank(sample);
|
||||
} else if (mVsyncRate != TimeDuration::Forever()) {
|
||||
TimeDuration contentDelay = (TimeStamp::Now() - mLastChildTick) - mVsyncRate;
|
||||
if (contentDelay.ToMilliseconds() < 0 ){
|
||||
// Vsyncs are noisy and some can come at a rate quicker than
|
||||
// the reported hardware rate. In those cases, consider that we have 0 delay.
|
||||
contentDelay = TimeDuration::FromMilliseconds(0);
|
||||
}
|
||||
uint32_t sample = (uint32_t)contentDelay.ToMilliseconds();
|
||||
RecordJank(sample);
|
||||
} else {
|
||||
// Request the vsync rate from the parent process. Might be a few vsyncs
|
||||
// until the parent responds.
|
||||
mVsyncRate = mVsyncRefreshDriverTimer->mVsyncChild->GetVsyncRate();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void RecordJank(uint32_t aJankMS)
|
||||
{
|
||||
uint32_t duration = 1 /* ms */;
|
||||
for (size_t i = 0;
|
||||
i < mozilla::ArrayLength(sJankLevels) && duration < aJankMS;
|
||||
++i, duration *= 2) {
|
||||
sJankLevels[i]++;
|
||||
}
|
||||
}
|
||||
|
||||
void TickRefreshDriver(TimeStamp aVsyncTimestamp)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
RecordTelemetryProbes(aVsyncTimestamp);
|
||||
if (XRE_IsParentProcess()) {
|
||||
MonitorAutoLock lock(mRefreshTickLock);
|
||||
aVsyncTimestamp = mRecentVsync;
|
||||
|
|
@ -2006,7 +1969,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
|
|||
mViewManagerFlushIsPending = false;
|
||||
RefPtr<nsViewManager> vm = mPresContext->GetPresShell()->GetViewManager();
|
||||
{
|
||||
PaintTelemetry::AutoRecordPaint record;
|
||||
vm->ProcessPendingUpdates();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue