Bug 1413104 - Drop telemetry probes for layer size; r=botond

MozReview-Commit-ID: FtpTJDC50A8

--HG--
extra : rebase_source : 2e1ba62ae1cb462546ce552efccdde2fe1380a00
This commit is contained in:
2017-12-14 21:36:09 +00:00
Родитель 4c74095a8d
Коммит 00626c42d9
5 изменённых файлов: 1 добавлений и 108 удалений

Просмотреть файл

@ -124,12 +124,6 @@ KeyframeEffect::SetTarget(const Nullable<ElementOrCSSPseudoElement>& aTarget)
nsNodeUtils::AnimationAdded(mAnimation);
}
}
// If the new target frame is also oversized we should probably record that
// too so we have a more complete picture of the type of frame sizes we
// encounter, hence we reset the telemetry flag here.
mRecordedContentTooLarge = false;
mRecordedFrameSize = false;
}
void

Просмотреть файл

@ -7,7 +7,6 @@
#include "mozilla/dom/KeyframeEffectReadOnly.h"
#include "FrameLayerBuilder.h"
#include "gfxPrefs.h"
#include "mozilla/dom/Animation.h"
#include "mozilla/dom/KeyframeAnimationOptionsBinding.h"
// For UnrestrictedDoubleOrKeyframeAnimationOptions;
@ -23,7 +22,6 @@
#include "mozilla/LookAndFeel.h" // For LookAndFeel::GetInt
#include "mozilla/KeyframeUtils.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/Telemetry.h"
#include "mozilla/TypeTraits.h"
#include "Layers.h" // For Layer
#include "nsComputedDOMStyle.h" // nsComputedDOMStyle::GetStyleContext
@ -1683,31 +1681,6 @@ KeyframeEffectReadOnly::SetPerformanceWarning(
nsCSSPropertyID aProperty,
const AnimationPerformanceWarning& aWarning)
{
if (aWarning.mType == AnimationPerformanceWarning::Type::ContentTooLarge &&
!mRecordedContentTooLarge) {
// ContentTooLarge stores: frameSize (w x h),
// relativeLimit (w x h), i.e. =~ viewport size *
// ratioLimit
// absoluteLimit (w x h)
MOZ_ASSERT(aWarning.mParams && aWarning.mParams->Length() >= 4,
"ContentTooLarge warning should have at least 4 parameters");
const nsTArray<int32_t>& params = aWarning.mParams.ref();
uint32_t frameSize = uint32_t(params[0]) * params[1];
float viewportRatioX = gfxPrefs::AnimationPrerenderViewportRatioLimitX();
float viewportRatioY = gfxPrefs::AnimationPrerenderViewportRatioLimitY();
double viewportWidth = viewportRatioX ? params[2] / viewportRatioX
: params[2];
double viewportHeight = viewportRatioY ? params[3] / viewportRatioY
: params[3];
double viewportSize = viewportWidth * viewportHeight;
uint32_t frameToViewport = frameSize / viewportSize * 100.0;
Telemetry::Accumulate(
Telemetry::ASYNC_ANIMATION_CONTENT_TOO_LARGE_FRAME_SIZE, frameSize);
Telemetry::Accumulate(
Telemetry::ASYNC_ANIMATION_CONTENT_TOO_LARGE_PERCENTAGE, frameToViewport);
mRecordedContentTooLarge = true;
}
for (AnimationProperty& property : mProperties) {
if (property.mProperty == aProperty &&
(!property.mPerformanceWarning ||
@ -1725,14 +1698,6 @@ KeyframeEffectReadOnly::SetPerformanceWarning(
}
}
void
KeyframeEffectReadOnly::RecordFrameSizeTelemetry(uint32_t aPixelArea) {
if (!mRecordedFrameSize) {
Telemetry::Accumulate(Telemetry::ASYNC_ANIMATION_FRAME_SIZE, aPixelArea);
mRecordedFrameSize = true;
}
}
already_AddRefed<nsStyleContext>
KeyframeEffectReadOnly::CreateStyleContextForAnimationValue(
nsCSSPropertyID aProperty,

Просмотреть файл

@ -254,9 +254,6 @@ public:
nsCSSPropertyID aProperty,
const AnimationPerformanceWarning& aWarning);
// Record telemetry about the size of the content being animated.
void RecordFrameSizeTelemetry(uint32_t aPixelArea);
// Cumulative change hint on each segment for each property.
// This is used for deciding the animation is paint-only.
template<typename StyleType>
@ -422,15 +419,6 @@ protected:
// EffectSet.
bool mInEffectSet = false;
// We only want to record telemetry data for "ContentTooLarge" warnings once
// per effect:target pair so we use this member to record if we have already
// reported a "ContentTooLarge" warning for the current target.
bool mRecordedContentTooLarge = false;
// Similarly, as a point of comparison we record telemetry whether or not
// we get a "ContentTooLarge" warning, but again only once per effect:target
// pair.
bool mRecordedFrameSize = false;
private:
nsChangeHint mCumulativeChangeHint;

Просмотреть файл

@ -8345,21 +8345,6 @@ nsDisplayTransform::CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder)
return mAllowAsyncAnimation;
}
static void
RecordAnimationFrameSizeTelemetry(nsIFrame* aFrame, const nsSize& overflow)
{
gfxSize scale = nsLayoutUtils::GetTransformToAncestorScale(aFrame);
nsSize frameSize = nsSize(overflow.width * scale.width,
overflow.height * scale.height);
uint32_t pixelArea = uint32_t(nsPresContext::AppUnitsToIntCSSPixels(frameSize.width))
* nsPresContext::AppUnitsToIntCSSPixels(frameSize.height);
if (EffectSet* effects = EffectSet::GetEffectSet(aFrame)) {
for (KeyframeEffectReadOnly* effect : *effects) {
effect->RecordFrameSizeTelemetry(pixelArea);
}
}
}
/* static */ auto
nsDisplayTransform::ShouldPrerenderTransformedContent(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame,
@ -8406,17 +8391,9 @@ nsDisplayTransform::ShouldPrerenderTransformedContent(nsDisplayListBuilder* aBui
}
}
nsRect overflow = aFrame->GetVisualOverflowRectRelativeToSelf();
// Record telemetry about the size of the animated content.
// Check CanRecordExtended() so we don't do any processing if the
// telemetry won't be recorded anyways.
if (Telemetry::CanRecordExtended()) {
RecordAnimationFrameSizeTelemetry(aFrame, overflow.Size());
}
// If the incoming dirty rect already contains the entire overflow area,
// we are already rendering the entire content.
nsRect overflow = aFrame->GetVisualOverflowRectRelativeToSelf();
if (aDirtyRect->Contains(overflow)) {
return FullPrerender;
}

Просмотреть файл

@ -145,37 +145,6 @@
"bug_numbers": [1172689],
"description": "Recorded when application reputation remote lookup is performed, `true` is recorded if the lookup times out."
},
"ASYNC_ANIMATION_CONTENT_TOO_LARGE_FRAME_SIZE": {
"record_in_processes": ["main", "content"],
"alert_emails": ["bbirtles@mozilla.com"],
"expires_in_version": "59",
"kind": "exponential",
"high": 80000000,
"n_buckets": 100,
"bug_numbers": [1100357, 1349808],
"description": "The number of pixels of the frame for each time we encountered a layer that was so large we decided not to run its animations on the compositor."
},
"ASYNC_ANIMATION_CONTENT_TOO_LARGE_PERCENTAGE": {
"record_in_processes": ["main", "content"],
"alert_emails": ["bbirtles@mozilla.com"],
"expires_in_version": "59",
"kind": "exponential",
"low": 100,
"high": 1000,
"n_buckets": 50,
"bug_numbers": [1100357, 1349808],
"description": "The ratio of the frame size (in total number of pixels) to the relative limit (~viewport size plus some tolerance factor, typically 12.5% in each dimension, i.e. ~27% tolerance in total area) for each time we encountered a layer that was so large we decided not to run its animations on the compositor expressed as a percentage (e.g. 130 = frame area was 30% larger than the relative limit)"
},
"ASYNC_ANIMATION_FRAME_SIZE": {
"record_in_processes": ["main", "content"],
"alert_emails": ["bbirtles@mozilla.com"],
"expires_in_version": "59",
"kind": "exponential",
"high": 80000000,
"n_buckets": 100,
"bug_numbers": [1100357, 1361915],
"description": "The number of pixels of the frame each time we potentially run a transform animation on the compositor. Intended for comparison with ASYNC_ANIMATION_CONTENT_TOO_LARGE_FRAME_SIZE. "
},
"AUDIOSTREAM_FIRST_OPEN_MS": {
"record_in_processes": ["main", "content"],
"expires_in_version": "50",