Bug 1798388 - add profiler markers for common accessibility functions. r=eeejay

Here is a sample profile with the new markers: https://share.firefox.dev/3DMY1cs

Differential Revision: https://phabricator.services.mozilla.com/D160847
This commit is contained in:
Michael Comella
2022-11-02 16:23:24 +00:00
parent 6b241593ea
commit 848ce4892b
4 changed files with 24 additions and 1 deletions

View File

@@ -17,7 +17,7 @@
#include "mozilla/dom/Element.h"
#include "mozilla/ipc/ProcessChild.h"
#include "mozilla/PresShell.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ProfilerMarkers.h"
#include "mozilla/StaticPrefs_accessibility.h"
#include "mozilla/Telemetry.h"
@@ -611,7 +611,10 @@ void NotificationController::ProcessMutationEvents() {
// NotificationCollector: private
void NotificationController::WillRefresh(mozilla::TimeStamp aTime) {
AUTO_PROFILER_MARKER_TEXT("NotificationController::WillRefresh", A11Y, {},
""_ns);
Telemetry::AutoTimer<Telemetry::A11Y_TREE_UPDATE_TIMING_MS> timer;
// DO NOT ADD CODE ABOVE THIS BLOCK: THIS CODE IS MEASURING TIMINGS.
AUTO_PROFILER_LABEL("NotificationController::WillRefresh", A11Y);