зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1518044
- Record SVG and UPLOAD specific variants of CONTENT_FRAME_TIME using the vsync based timings. r=jrmuizel
We're switching to prefering the vsync version, so making these diagnostic equivalents use that timing should be more useful. I think leaving the profiler marker (which uses ms, not vsync%) showing just the graphics component still makes sense. Differential Revision: https://phabricator.services.mozilla.com/D15796 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
4b8807201a
Коммит
38c31ce8f3
|
@ -2423,7 +2423,6 @@ int32_t RecordContentFrameTime(
|
|||
double latencyMs = (aCompositeEnd - aTxnStart).ToMilliseconds();
|
||||
double latencyNorm = latencyMs / aVsyncRate.ToMilliseconds();
|
||||
int32_t fracLatencyNorm = lround(latencyNorm * 100.0);
|
||||
int32_t result = fracLatencyNorm;
|
||||
|
||||
#ifdef MOZ_GECKO_PROFILER
|
||||
if (profiler_is_active()) {
|
||||
|
@ -2446,35 +2445,19 @@ int32_t RecordContentFrameTime(
|
|||
#endif
|
||||
|
||||
Telemetry::Accumulate(Telemetry::CONTENT_FRAME_TIME, fracLatencyNorm);
|
||||
if (aContainsSVGGroup) {
|
||||
Telemetry::Accumulate(Telemetry::CONTENT_FRAME_TIME_WITH_SVG,
|
||||
fracLatencyNorm);
|
||||
}
|
||||
|
||||
if (aRecordUploadStats) {
|
||||
if (aStats) {
|
||||
latencyMs -= (double(aStats->resource_upload_time) / 1000000.0);
|
||||
latencyNorm = latencyMs / aVsyncRate.ToMilliseconds();
|
||||
fracLatencyNorm = lround(latencyNorm * 100.0);
|
||||
}
|
||||
Telemetry::Accumulate(Telemetry::CONTENT_FRAME_TIME_WITHOUT_RESOURCE_UPLOAD,
|
||||
fracLatencyNorm);
|
||||
|
||||
if (aStats) {
|
||||
latencyMs -= (double(aStats->gpu_cache_upload_time) / 1000000.0);
|
||||
latencyNorm = latencyMs / aVsyncRate.ToMilliseconds();
|
||||
fracLatencyNorm = lround(latencyNorm * 100.0);
|
||||
}
|
||||
Telemetry::Accumulate(Telemetry::CONTENT_FRAME_TIME_WITHOUT_UPLOAD,
|
||||
fracLatencyNorm);
|
||||
}
|
||||
|
||||
if (!(aTxnId == VsyncId()) && aVsyncStart) {
|
||||
latencyMs = (aCompositeEnd - aVsyncStart).ToMilliseconds();
|
||||
latencyNorm = latencyMs / aVsyncRate.ToMilliseconds();
|
||||
fracLatencyNorm = lround(latencyNorm * 100.0);
|
||||
int32_t result = fracLatencyNorm;
|
||||
Telemetry::Accumulate(Telemetry::CONTENT_FRAME_TIME_VSYNC, fracLatencyNorm);
|
||||
|
||||
if (aContainsSVGGroup) {
|
||||
Telemetry::Accumulate(Telemetry::CONTENT_FRAME_TIME_WITH_SVG,
|
||||
fracLatencyNorm);
|
||||
}
|
||||
|
||||
// Record CONTENT_FRAME_TIME_REASON.
|
||||
//
|
||||
// Note that deseralizing a layers update (RecvUpdate) can delay the receipt
|
||||
|
@ -2531,9 +2514,29 @@ int32_t RecordContentFrameTime(
|
|||
LABELS_CONTENT_FRAME_TIME_REASON::SlowComposite);
|
||||
}
|
||||
}
|
||||
|
||||
if (aRecordUploadStats) {
|
||||
if (aStats) {
|
||||
latencyMs -= (double(aStats->resource_upload_time) / 1000000.0);
|
||||
latencyNorm = latencyMs / aVsyncRate.ToMilliseconds();
|
||||
fracLatencyNorm = lround(latencyNorm * 100.0);
|
||||
}
|
||||
Telemetry::Accumulate(
|
||||
Telemetry::CONTENT_FRAME_TIME_WITHOUT_RESOURCE_UPLOAD,
|
||||
fracLatencyNorm);
|
||||
|
||||
if (aStats) {
|
||||
latencyMs -= (double(aStats->gpu_cache_upload_time) / 1000000.0);
|
||||
latencyNorm = latencyMs / aVsyncRate.ToMilliseconds();
|
||||
fracLatencyNorm = lround(latencyNorm * 100.0);
|
||||
}
|
||||
Telemetry::Accumulate(Telemetry::CONTENT_FRAME_TIME_WITHOUT_UPLOAD,
|
||||
fracLatencyNorm);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
return result;
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace layers
|
||||
|
|
Загрузка…
Ссылка в новой задаче