Skip to content

Commit

Permalink
Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (an…
Browse files Browse the repository at this point in the history
…d maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian

There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
  • Loading branch information
squelart committed Feb 16, 2021
1 parent 3645906 commit 60c7deb
Show file tree
Hide file tree
Showing 147 changed files with 175 additions and 140 deletions.
2 changes: 1 addition & 1 deletion accessible/base/NotificationController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

#include "DocAccessible-inl.h"
#include "DocAccessibleChild.h"
#include "GeckoProfiler.h"
#include "nsEventShell.h"
#include "TextLeafAccessible.h"
#include "TextUpdater.h"

#include "mozilla/dom/BrowserChild.h"
#include "mozilla/dom/Element.h"
#include "mozilla/PresShell.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/Telemetry.h"

using namespace mozilla;
Expand Down
3 changes: 2 additions & 1 deletion dom/base/ChromeUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
#include "IOActivityMonitor.h"
#include "nsThreadUtils.h"
#include "mozJSComponentLoader.h"
#include "GeckoProfiler.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ProfilerMarkers.h"
#include "nsIException.h"

namespace mozilla::dom {
Expand Down
2 changes: 1 addition & 1 deletion dom/base/WindowDestroyedEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "WindowDestroyedEvent.h"

#include "GeckoProfiler.h"
#include "nsJSUtils.h"
#include "jsapi.h"
#include "js/Wrapper.h"
Expand All @@ -19,6 +18,7 @@
#include "xpcpublic.h"
#include "mozilla/BasePrincipal.h"
#include "mozilla/Components.h"
#include "mozilla/ProfilerLabels.h"

namespace mozilla {

Expand Down
1 change: 1 addition & 0 deletions dom/base/nsContentSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include "nsGenericHTMLElement.h"
#include "nsIObserverService.h"
#include "mozilla/Preferences.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/dom/HTMLDNSPrefetch.h"
#include "mozilla/dom/ServiceWorkerDescriptor.h"
#include "mozilla/dom/ScriptLoader.h"
Expand Down
3 changes: 2 additions & 1 deletion dom/base/nsDOMWindowUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
#include "nsIBaseWindow.h"
#include "nsIDocShellTreeOwner.h"
#include "nsIInterfaceRequestorUtils.h"
#include "GeckoProfiler.h"
#include "mozilla/Preferences.h"
#include "nsContentPermissionHelper.h"
#include "nsCSSPseudoElements.h" // for PseudoStyleType
Expand All @@ -121,6 +120,8 @@
#include "mozilla/gfx/GPUProcessManager.h"
#include "mozilla/dom/TimeoutManager.h"
#include "mozilla/PreloadedStyleSheet.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ProfilerMarkers.h"
#include "mozilla/layers/WebRenderBridgeChild.h"
#include "mozilla/layers/WebRenderLayerManager.h"
#include "mozilla/DisplayPortUtils.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/base/nsFrameLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
#include "mozilla/dom/WindowGlobalParent.h"
#include "mozilla/dom/XULFrameElement.h"
#include "mozilla/gfx/CrossProcessPaint.h"
#include "mozilla/ProfilerLabels.h"
#include "nsGenericHTMLFrameElement.h"
#include "GeckoProfiler.h"

#include "jsapi.h"
#include "mozilla/dom/HTMLIFrameElement.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/base/nsFrameMessageManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <utility>
#include "ContentChild.h"
#include "ErrorList.h"
#include "GeckoProfiler.h"
#include "mozilla/ProfilerLabels.h"
#include "base/process_util.h"
#include "chrome/common/ipc_channel.h"
#include "js/CompilationAndEvaluation.h"
Expand Down
1 change: 1 addition & 0 deletions dom/base/nsINode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "mozilla/dom/SVGUseElement.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/L10nOverlays.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/StaticPrefs_layout.h"
#include "nsAttrValueOrString.h"
#include "nsCCUncollectableMarker.h"
Expand Down
3 changes: 2 additions & 1 deletion dom/base/nsJSEnvironment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@
#include "mozilla/ContentEvents.h"
#include "mozilla/CycleCollectedJSContext.h"
#include "nsCycleCollectionNoteRootCallback.h"
#include "GeckoProfiler.h"
#include "mozilla/IdleTaskRunner.h"
#include "nsViewManager.h"
#include "mozilla/EventStateManager.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ProfilerMarkers.h"

using namespace mozilla;
using namespace mozilla::dom;
Expand Down
2 changes: 1 addition & 1 deletion dom/base/nsJSUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "nsJSUtils.h"

#include <utility>
#include "GeckoProfiler.h"
#include "MainThreadUtils.h"
#include "js/ComparisonOperators.h"
#include "js/CompilationAndEvaluation.h"
Expand All @@ -32,6 +31,7 @@
#include "mozilla/dom/Element.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/fallible.h"
#include "mozilla/ProfilerLabels.h"
#include "nsContentUtils.h"
#include "nsDebug.h"
#include "nsGlobalWindowInner.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/base/nsObjectLoadingContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@

#include "nsObjectLoadingContent.h"
#include "mozAutoDocUpdate.h"
#include "GeckoProfiler.h"
#include "nsWrapperCacheInlines.h"
#include "nsDOMJSUtils.h"
#include "js/Object.h" // JS::GetClass
Expand Down Expand Up @@ -95,6 +94,7 @@
#include "mozilla/net/UrlClassifierFeatureFactory.h"
#include "mozilla/LoadInfo.h"
#include "mozilla/PresShell.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/StaticPrefs_browser.h"
#include "mozilla/StaticPrefs_security.h"
#include "nsChannelClassifier.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/canvas/WebGLContextDraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

#include "WebGLContext.h"

#include "GeckoProfiler.h"
#include "MozFramebuffer.h"
#include "GLContext.h"
#include "mozilla/CheckedInt.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/UniquePtrExtensions.h"
#include "nsPrintfCString.h"
#include "WebGLBuffer.h"
Expand Down
3 changes: 2 additions & 1 deletion dom/events/EventDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "CompositionEvent.h"
#include "DeviceMotionEvent.h"
#include "DragEvent.h"
#include "GeckoProfiler.h"
#include "KeyboardEvent.h"
#include "Layers.h"
#include "mozilla/BasePrincipal.h"
Expand Down Expand Up @@ -59,6 +58,8 @@
#include "mozilla/ipc/MessageChannel.h"
#include "mozilla/MiscEvents.h"
#include "mozilla/MouseEvents.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ProfilerMarkers.h"
#include "mozilla/Telemetry.h"
#include "mozilla/TextEvents.h"
#include "mozilla/TouchEvents.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/events/EventStateManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@

#include "mozilla/Preferences.h"
#include "mozilla/LookAndFeel.h"
#include "GeckoProfiler.h"
#include "mozilla/ProfilerLabels.h"
#include "Units.h"

#ifdef XP_MACOSX
Expand Down
1 change: 1 addition & 0 deletions dom/html/HTMLCanvasElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "mozilla/layers/WebRenderUserData.h"
#include "mozilla/MouseEvents.h"
#include "mozilla/Preferences.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/Telemetry.h"
#include "mozilla/webgpu/CanvasContext.h"
#include "nsAttrValueInlines.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/html/PluginDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include "nsContentPolicyUtils.h"
#include "mozilla/dom/Element.h"
#include "mozilla/PresShell.h"
#include "mozilla/ProfilerLabels.h"
#include "nsObjectLoadingContent.h"
#include "GeckoProfiler.h"

namespace mozilla::dom {

Expand Down
2 changes: 1 addition & 1 deletion dom/html/nsGenericHTMLFrameElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#include "mozilla/dom/WindowProxyHolder.h"
#include "mozilla/Preferences.h"
#include "mozilla/PresShell.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/StaticPrefs_dom.h"
#include "mozilla/ErrorResult.h"
#include "GeckoProfiler.h"
#include "nsAttrValueInlines.h"
#include "nsContentUtils.h"
#include "nsIDocShell.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/ActorsChild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <type_traits>

#include "BackgroundChildImpl.h"
#include "GeckoProfiler.h"
#include "IDBDatabase.h"
#include "IDBEvents.h"
#include "IDBFactory.h"
Expand Down Expand Up @@ -41,6 +40,7 @@
#include "mozilla/dom/WorkerRunnable.h"
#include "mozilla/Encoding.h"
#include "mozilla/ipc/BackgroundUtils.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/TaskQueue.h"
#include "nsCOMPtr.h"
#include "nsContentUtils.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/ActorsParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "FileInfoT.h"
#include "FileManager.h"
#include "FileManagerBase.h"
#include "GeckoProfiler.h"
#include "IDBCursorType.h"
#include "IDBObjectStore.h"
#include "IDBTransaction.h"
Expand Down Expand Up @@ -76,6 +75,7 @@
#include "mozilla/Mutex.h"
#include "mozilla/NotNull.h"
#include "mozilla/Preferences.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/RefCountType.h"
#include "mozilla/RefCounted.h"
#include "mozilla/RemoteLazyInputStreamParent.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/ActorsParentCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <algorithm>
#include <numeric>
#include <type_traits>
#include "GeckoProfiler.h"
#include "MainThreadUtils.h"
#include "SafeRefPtr.h"
#include "js/RootingAPI.h"
Expand All @@ -33,6 +32,7 @@
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/JSObjectHolder.h"
#include "mozilla/NullPrincipal.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/RefPtr.h"
#include "mozilla/ResultExtensions.h"
#include "mozilla/StaticPtr.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/DBSchema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

// global includes
#include "ErrorList.h"
#include "GeckoProfiler.h"
#include "js/StructuredClone.h"
#include "mozIStorageConnection.h"
#include "mozilla/dom/quota/QuotaCommon.h"
#include "mozilla/ProfilerLabels.h"
#include "nsDebug.h"
#include "nsError.h"
#include "nsLiteralString.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/SchemaUpgrades.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <type_traits>
#include <utility>
#include "ErrorList.h"
#include "GeckoProfiler.h"
#include "MainThreadUtils.h"
#include "SafeRefPtr.h"
#include "js/RootingAPI.h"
Expand Down Expand Up @@ -52,6 +51,7 @@
#include "mozilla/fallible.h"
#include "mozilla/ipc/BackgroundParent.h"
#include "mozilla/mozalloc.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/storage/Variant.h"
#include "nsCOMPtr.h"
#include "nsDebug.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/ipc/BrowserChild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "DocumentInlines.h"
#include "EventStateManager.h"
#include "FrameLayerBuilder.h"
#include "GeckoProfiler.h"
#include "Layers.h"
#include "MMPrinter.h"
#include "PermissionMessageUtils.h"
Expand All @@ -43,6 +42,7 @@
#include "mozilla/Preferences.h"
#include "mozilla/PresShell.h"
#include "mozilla/ProcessHangMonitor.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ResultExtensions.h"
#include "mozilla/ScopeExit.h"
#include "mozilla/Services.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/ipc/BrowserParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
#include "IHistory.h"
#include "mozilla/dom/WindowGlobalParent.h"
#include "mozilla/dom/CanonicalBrowsingContext.h"
#include "GeckoProfiler.h"
#include "mozilla/ProfilerLabels.h"
#include "MMPrinter.h"
#include "SessionStoreFunctions.h"
#include "mozilla/dom/CrashReport.h"
Expand Down
3 changes: 2 additions & 1 deletion dom/ipc/ContentParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#ifdef ACCESSIBILITY
# include "mozilla/a11y/PDocAccessible.h"
#endif
#include "GeckoProfiler.h"
#include "GMPServiceParent.h"
#include "HandlerServiceParent.h"
#include "IHistory.h"
Expand Down Expand Up @@ -67,6 +66,8 @@
#include "mozilla/PresShell.h"
#include "mozilla/ProcessHangMonitor.h"
#include "mozilla/ProcessHangMonitorIPC.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ProfilerMarkers.h"
#include "mozilla/ScopeExit.h"
#include "mozilla/ScriptPreloader.h"
#include "mozilla/Services.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/media/MediaDecoderStateMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "mozilla/Logging.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/NotNull.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/SharedThreadPool.h"
#include "mozilla/Sprintf.h"
#include "mozilla/StaticPrefs_media.h"
Expand All @@ -27,7 +28,6 @@
#include "AudioSegment.h"
#include "DOMMediaStream.h"
#include "ImageContainer.h"
#include "GeckoProfiler.h"
#include "MediaDecoder.h"
#include "MediaDecoderStateMachine.h"
#include "MediaShutdownManager.h"
Expand Down
3 changes: 2 additions & 1 deletion dom/media/MediaFormatReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include "AllocationPolicy.h"
#include "DecoderBenchmark.h"
#include "GeckoProfiler.h"
#include "MediaData.h"
#include "MediaDataDecoderProxy.h"
#include "MediaInfo.h"
Expand All @@ -24,6 +23,8 @@
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/NotNull.h"
#include "mozilla/Preferences.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ProfilerMarkers.h"
#include "mozilla/SharedThreadPool.h"
#include "mozilla/StaticPrefs_media.h"
#include "mozilla/TaskQueue.h"
Expand Down
1 change: 0 additions & 1 deletion dom/media/MediaRecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "AudioNodeEngine.h"
#include "AudioNodeTrack.h"
#include "DOMMediaStream.h"
#include "GeckoProfiler.h"
#include "MediaDecoder.h"
#include "MediaEncoder.h"
#include "MediaTrackGraphImpl.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/media/encoder/MediaEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "AudioNodeEngine.h"
#include "AudioNodeTrack.h"
#include "DriftCompensation.h"
#include "GeckoProfiler.h"
#include "MediaDecoder.h"
#include "MediaTrackGraphImpl.h"
#include "MediaTrackListener.h"
Expand All @@ -22,6 +21,7 @@
#include "mozilla/gfx/Point.h" // IntSize
#include "mozilla/Logging.h"
#include "mozilla/Preferences.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/StaticPrefs_media.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/TaskQueue.h"
Expand Down
2 changes: 1 addition & 1 deletion dom/media/encoder/OpusTrackEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "OpusTrackEncoder.h"
#include "nsString.h"
#include "GeckoProfiler.h"
#include "mozilla/CheckedInt.h"
#include "mozilla/ProfilerLabels.h"
#include "VideoUtils.h"

#include <opus/opus.h>
Expand Down
Loading

0 comments on commit 60c7deb

Please sign in to comment.