Bug 1487332 - Re-sorted the header files of .cpp/.h telemetry files. r=Dexter
authordivyansh <sharma.divyansh.501@iitg.ernet.in>
Wed, 10 Oct 2018 04:55:10 +0000
changeset 496153 fd465ab13d0f27061fd7590ae482c87a4d1f084e
parent 496152 4a56af71f2d879db6fe0b0efeee9324f3e245bc7
child 496154 e8e4080d11009e7e05871301f252a593e913e497
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersDexter
bugs1487332
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1487332 - Re-sorted the header files of .cpp/.h telemetry files. r=Dexter Bug 1487332 - Re-sorted the header files of .cpp/.h telemetry files. Differential Revision: https://phabricator.services.mozilla.com/D5840
toolkit/components/telemetry/core/Telemetry.cpp
toolkit/components/telemetry/core/Telemetry.h
toolkit/components/telemetry/core/TelemetryCommon.cpp
toolkit/components/telemetry/core/TelemetryCommon.h
toolkit/components/telemetry/core/TelemetryEvent.cpp
toolkit/components/telemetry/core/TelemetryEvent.h
toolkit/components/telemetry/core/TelemetryHistogram.cpp
toolkit/components/telemetry/core/TelemetryHistogram.h
toolkit/components/telemetry/core/TelemetryScalar.cpp
toolkit/components/telemetry/core/TelemetryScalar.h
toolkit/components/telemetry/core/ipc/TelemetryComms.h
toolkit/components/telemetry/core/ipc/TelemetryIPC.h
toolkit/components/telemetry/core/ipc/TelemetryIPCAccumulator.cpp
toolkit/components/telemetry/geckoview/TelemetryGeckoViewPersistence.cpp
toolkit/components/telemetry/geckoview/gtest/TestGeckoView.cpp
toolkit/components/telemetry/other/CombinedStacks.cpp
toolkit/components/telemetry/other/KeyedStackCapturer.cpp
toolkit/components/telemetry/other/KeyedStackCapturer.h
toolkit/components/telemetry/other/TelemetryIOInterposeObserver.h
toolkit/components/telemetry/other/WebrtcTelemetry.cpp
toolkit/components/telemetry/pingsender/pingsender_unix_common.cpp
toolkit/components/telemetry/tests/gtest/TelemetryFixture.h
toolkit/components/telemetry/tests/gtest/TelemetryTestHelpers.cpp
toolkit/components/telemetry/tests/gtest/TestCounters.cpp
toolkit/components/telemetry/tests/gtest/TestHistograms.cpp
toolkit/components/telemetry/tests/gtest/TestScalars.cpp
--- a/toolkit/components/telemetry/core/Telemetry.cpp
+++ b/toolkit/components/telemetry/core/Telemetry.cpp
@@ -1,107 +1,102 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#include "Telemetry.h"
+
 #include <algorithm>
-
 #include <prio.h>
 #include <prproces.h>
 #if defined(XP_UNIX) && !defined(XP_DARWIN)
 #include <time.h>
 #else
 #include <chrono>
 #endif
-
+#include "base/pickle.h"
+#if defined(MOZ_TELEMETRY_GECKOVIEW)
+#include "geckoview/TelemetryGeckoViewPersistence.h"
+#endif
+#include "ipc/TelemetryIPCAccumulator.h"
+#include "jsapi.h"
+#include "jsfriendapi.h"
+#include "js/GCAPI.h"
 #include "mozilla/dom/ToJSValue.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/Atomics.h"
 #include "mozilla/Attributes.h"
+#include "mozilla/BackgroundHangMonitor.h"
 #include "mozilla/DebugOnly.h"
+#include "mozilla/FStream.h"
+#include "mozilla/IOInterposer.h"
 #include "mozilla/Likely.h"
 #include "mozilla/MathAlgorithms.h"
-#include "mozilla/Unused.h"
-
-#include "base/pickle.h"
-#include "other/CombinedStacks.h"
-#include "nsIComponentManager.h"
-#include "nsIServiceManager.h"
-#include "nsThreadManager.h"
-#include "nsXPCOMCIDInternal.h"
-#include "nsCOMArray.h"
-#include "nsCOMPtr.h"
-#include "nsXPCOMPrivate.h"
-#include "nsIXULAppInfo.h"
-#include "nsVersionComparator.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/ModuleUtils.h"
-#include "nsIXPConnect.h"
+#include "mozilla/Mutex.h"
+#include "mozilla/PoisonIOInterposer.h"
+#include "mozilla/Preferences.h"
+#include "mozilla/ProcessedStack.h"
 #include "mozilla/Services.h"
-#include "jsapi.h"
-#include "jsfriendapi.h"
-#include "js/GCAPI.h"
-#include "nsString.h"
-#include "nsITelemetry.h"
+#include "mozilla/StartupTimeline.h"
+#include "mozilla/StaticPtr.h"
+#include "mozilla/Unused.h"
+#if defined(XP_WIN)
+#include "mozilla/WinDllServices.h"
+#endif
+#include "nsAppDirectoryServiceDefs.h"
+#include "nsBaseHashtable.h"
+#include "nsClassHashtable.h"
+#include "nsCOMArray.h"
+#include "nsCOMPtr.h"
+#include "nsDataHashtable.h"
+#include "nsHashKeys.h"
+#include "nsIComponentManager.h"
 #include "nsIDirectoryEnumerator.h"
 #include "nsIFileStreams.h"
-#include "nsLocalFile.h"
 #include "nsIMemoryReporter.h"
 #include "nsISeekableStream.h"
+#include "nsIServiceManager.h"
 #include "nsISimpleEnumerator.h"
-#include "Telemetry.h"
-#include "TelemetryCommon.h"
-#include "TelemetryHistogram.h"
-#include "other/TelemetryIOInterposeObserver.h"
-#include "ipc/TelemetryIPCAccumulator.h"
-#include "TelemetryScalar.h"
-#include "TelemetryEvent.h"
-#include "other/WebrtcTelemetry.h"
+#include "nsITelemetry.h"
+#include "nsIXPConnect.h"
+#include "nsIXULAppInfo.h"
+#include "nsJSUtils.h"
+#include "nsLocalFile.h"
+#include "nsNativeCharsetUtils.h"
+#include "nsNetCID.h"
+#include "nsNetUtil.h"
+#include "nsProxyRelease.h"
+#include "nsReadableUtils.h"
+#include "nsString.h"
 #include "nsTHashtable.h"
-#include "nsHashKeys.h"
-#include "nsBaseHashtable.h"
-#include "nsClassHashtable.h"
-#include "nsDataHashtable.h"
-#include "nsXULAppAPI.h"
-#include "nsReadableUtils.h"
+#include "nsThreadManager.h"
 #include "nsThreadUtils.h"
 #if defined(XP_WIN)
 #include "nsUnicharUtils.h"
 #endif
-#include "nsNetCID.h"
-#include "nsNetUtil.h"
-#include "nsJSUtils.h"
-#include "nsReadableUtils.h"
+#include "nsVersionComparator.h"
+#include "nsXPCOMCIDInternal.h"
+#include "nsXPCOMPrivate.h"
+#include "nsXULAppAPI.h"
+#include "other/CombinedStacks.h"
+#include "other/TelemetryIOInterposeObserver.h"
+#include "other/WebrtcTelemetry.h"
 #include "plstr.h"
-#include "nsAppDirectoryServiceDefs.h"
-#include "mozilla/BackgroundHangMonitor.h"
-#include "mozilla/FStream.h"
-#include "mozilla/ProcessedStack.h"
-#include "mozilla/Mutex.h"
-#include "mozilla/Preferences.h"
-#include "mozilla/StaticPtr.h"
-#include "mozilla/IOInterposer.h"
-#include "mozilla/PoisonIOInterposer.h"
-#include "mozilla/StartupTimeline.h"
-#if defined(XP_WIN)
-#include "mozilla/WinDllServices.h"
-#endif
-#include "nsNativeCharsetUtils.h"
-#include "nsProxyRelease.h"
-
 #if defined(MOZ_GECKO_PROFILER)
 #include "shared-libraries.h"
 #include "other/KeyedStackCapturer.h"
 #endif // MOZ_GECKO_PROFILER
-
-#if defined(MOZ_TELEMETRY_GECKOVIEW)
-#include "geckoview/TelemetryGeckoViewPersistence.h"
-#endif
+#include "TelemetryCommon.h"
+#include "TelemetryEvent.h"
+#include "TelemetryHistogram.h"
+#include "TelemetryScalar.h"
 
 namespace {
 
 using namespace mozilla;
 using Telemetry::Common::AutoHashtable;
 using Telemetry::Common::ToJSString;
 using Telemetry::Common::GetCurrentProduct;
 using Telemetry::Common::SetCurrentProduct;
--- a/toolkit/components/telemetry/core/Telemetry.h
+++ b/toolkit/components/telemetry/core/Telemetry.h
@@ -2,24 +2,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef Telemetry_h__
 #define Telemetry_h__
 
 #include "mozilla/GuardObjects.h"
-#include "mozilla/TimeStamp.h"
 #include "mozilla/StartupTimeline.h"
-#include "nsTArray.h"
-#include "nsString.h"
-#include "nsXULAppAPI.h"
-
 #include "mozilla/TelemetryHistogramEnums.h"
 #include "mozilla/TelemetryScalarEnums.h"
+#include "mozilla/TimeStamp.h"
+#include "nsString.h"
+#include "nsTArray.h"
+#include "nsXULAppAPI.h"
 
 /******************************************************************************
  * This implements the Telemetry system.
  * It allows recording into histograms as well some more specialized data
  * points and gives access to the data.
  *
  * For documentation on how to add and use new Telemetry probes, see:
  * https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Adding_a_new_Telemetry_probe
--- a/toolkit/components/telemetry/core/TelemetryCommon.cpp
+++ b/toolkit/components/telemetry/core/TelemetryCommon.cpp
@@ -1,26 +1,25 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "nsITelemetry.h"
-#include "nsVersionComparator.h"
+#include "TelemetryCommon.h"
+
+#include <cstring>
 #include "mozilla/TimeStamp.h"
 #include "mozilla/Preferences.h"
 #include "nsIConsoleService.h"
+#include "nsITelemetry.h"
 #include "nsThreadUtils.h"
-
-#include "TelemetryCommon.h"
+#include "nsVersionComparator.h"
 #include "TelemetryProcessData.h"
 
-#include <cstring>
-
 namespace mozilla {
 namespace Telemetry {
 namespace Common {
 
 bool
 IsExpiredVersion(const char* aExpiration)
 {
   MOZ_ASSERT(aExpiration);
--- a/toolkit/components/telemetry/core/TelemetryCommon.h
+++ b/toolkit/components/telemetry/core/TelemetryCommon.h
@@ -1,22 +1,22 @@
 /* -*-  Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef TelemetryCommon_h__
 #define TelemetryCommon_h__
 
-#include "nsTHashtable.h"
 #include "jsapi.h"
-#include "nsIScriptError.h"
-#include "nsXULAppAPI.h"
 #include "mozilla/TypedEnumBits.h"
 #include "mozilla/TelemetryProcessEnums.h"
+#include "nsIScriptError.h"
+#include "nsTHashtable.h"
+#include "nsXULAppAPI.h"
 
 namespace mozilla {
 namespace Telemetry {
 namespace Common {
 
 enum class RecordedProcessType : uint32_t {
   Main         = (1 << GeckoProcessType_Default),  // Also known as "parent process"
   Content      = (1 << GeckoProcessType_Content),
--- a/toolkit/components/telemetry/core/TelemetryEvent.cpp
+++ b/toolkit/components/telemetry/core/TelemetryEvent.cpp
@@ -1,41 +1,40 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#include "Telemetry.h"
+#include "TelemetryEvent.h"
 #include <prtime.h>
 #include <limits>
+#include "ipc/TelemetryIPCAccumulator.h"
+#include "jsapi.h"
+#include "mozilla/Maybe.h"
+#include "mozilla/Pair.h"
+#include "mozilla/Preferences.h"
+#include "mozilla/Services.h"
+#include "mozilla/StaticMutex.h"
+#include "mozilla/StaticPtr.h"
+#include "mozilla/Unused.h"
+#include "nsClassHashtable.h"
+#include "nsDataHashtable.h"
+#include "nsHashKeys.h"
 #include "nsIObserverService.h"
 #include "nsITelemetry.h"
-#include "nsHashKeys.h"
-#include "nsDataHashtable.h"
-#include "nsClassHashtable.h"
+#include "nsJSUtils.h"
+#include "nsPrintfCString.h"
 #include "nsTArray.h"
-#include "mozilla/Preferences.h"
-#include "mozilla/StaticMutex.h"
-#include "mozilla/Unused.h"
-#include "mozilla/Maybe.h"
-#include "mozilla/Services.h"
-#include "mozilla/StaticPtr.h"
-#include "mozilla/Pair.h"
-#include "jsapi.h"
-#include "nsJSUtils.h"
+#include "nsUTF8Utils.h"
 #include "nsXULAppAPI.h"
-#include "nsUTF8Utils.h"
-#include "nsPrintfCString.h"
-
-#include "Telemetry.h"
 #include "TelemetryCommon.h"
-#include "TelemetryEvent.h"
 #include "TelemetryEventData.h"
 #include "TelemetryScalar.h"
-#include "ipc/TelemetryIPCAccumulator.h"
 
 using mozilla::StaticMutex;
 using mozilla::StaticMutexAutoLock;
 using mozilla::ArrayLength;
 using mozilla::Maybe;
 using mozilla::Nothing;
 using mozilla::StaticAutoPtr;
 using mozilla::TimeStamp;
--- a/toolkit/components/telemetry/core/TelemetryEvent.h
+++ b/toolkit/components/telemetry/core/TelemetryEvent.h
@@ -1,16 +1,17 @@
 /* -*-  Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef TelemetryEvent_h__
 #define TelemetryEvent_h__
 
+#include <stdint.h>
 #include "mozilla/TelemetryEventEnums.h"
 #include "mozilla/TelemetryProcessEnums.h"
 
 namespace mozilla {
 namespace Telemetry {
   struct ChildEventData;
 }
 }
--- a/toolkit/components/telemetry/core/TelemetryHistogram.cpp
+++ b/toolkit/components/telemetry/core/TelemetryHistogram.cpp
@@ -1,42 +1,39 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#include "TelemetryHistogram.h"
+
+#include <limits>
+#include "base/histogram.h"
+#include "ipc/TelemetryIPCAccumulator.h"
 #include "jsapi.h"
 #include "jsfriendapi.h"
 #include "js/GCAPI.h"
-#include "nsString.h"
-#include "nsTHashtable.h"
-#include "nsHashKeys.h"
-#include "nsBaseHashtable.h"
-#include "nsClassHashtable.h"
-#include "nsITelemetry.h"
-#include "nsPrintfCString.h"
-
 #include "mozilla/dom/ToJSValue.h"
 #include "mozilla/gfx/GPUProcessManager.h"
 #include "mozilla/Atomics.h"
 #include "mozilla/JSONWriter.h"
 #include "mozilla/StartupTimeline.h"
 #include "mozilla/StaticMutex.h"
 #include "mozilla/Unused.h"
-
+#include "nsBaseHashtable.h"
+#include "nsClassHashtable.h"
+#include "nsString.h"
+#include "nsTHashtable.h"
+#include "nsHashKeys.h"
+#include "nsITelemetry.h"
+#include "nsPrintfCString.h"
 #include "TelemetryCommon.h"
-#include "TelemetryHistogram.h"
 #include "TelemetryHistogramNameMap.h"
 #include "TelemetryScalar.h"
-#include "ipc/TelemetryIPCAccumulator.h"
-
-#include "base/histogram.h"
-
-#include <limits>
 
 using base::Histogram;
 using base::BooleanHistogram;
 using base::CountHistogram;
 using base::FlagHistogram;
 using base::LinearHistogram;
 using mozilla::MakeTuple;
 using mozilla::StaticMutexNotRecorded;
--- a/toolkit/components/telemetry/core/TelemetryHistogram.h
+++ b/toolkit/components/telemetry/core/TelemetryHistogram.h
@@ -1,20 +1,19 @@
 /* -*-  Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef TelemetryHistogram_h__
 #define TelemetryHistogram_h__
 
+#include "mozilla/TelemetryComms.h"
 #include "mozilla/TelemetryHistogramEnums.h"
 #include "mozilla/TelemetryProcessEnums.h"
-
-#include "mozilla/TelemetryComms.h"
 #include "nsXULAppAPI.h"
 
 namespace mozilla{
 // This is only used for the GeckoView persistence.
 class JSONWriter;
 }
 
 // This module is internal to Telemetry.  It encapsulates Telemetry's
--- a/toolkit/components/telemetry/core/TelemetryScalar.cpp
+++ b/toolkit/components/telemetry/core/TelemetryScalar.cpp
@@ -1,39 +1,39 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "nsITelemetry.h"
-#include "nsIVariant.h"
-#include "nsVariant.h"
-#include "nsHashKeys.h"
-#include "nsBaseHashtable.h"
-#include "nsClassHashtable.h"
-#include "nsDataHashtable.h"
-#include "nsIXPConnect.h"
-#include "nsContentUtils.h"
-#include "nsThreadUtils.h"
-#include "nsJSUtils.h"
-#include "nsPrintfCString.h"
+#include "TelemetryScalar.h"
+
+#include "ipc/TelemetryComms.h"
+#include "ipc/TelemetryIPCAccumulator.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/PContent.h"
 #include "mozilla/JSONWriter.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/StaticMutex.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/Unused.h"
-
+#include "nsBaseHashtable.h"
+#include "nsClassHashtable.h"
+#include "nsContentUtils.h"
+#include "nsDataHashtable.h"
+#include "nsHashKeys.h"
+#include "nsITelemetry.h"
+#include "nsIVariant.h"
+#include "nsIXPConnect.h"
+#include "nsJSUtils.h"
+#include "nsPrintfCString.h"
+#include "nsThreadUtils.h"
+#include "nsVariant.h"
 #include "TelemetryCommon.h"
-#include "TelemetryScalar.h"
 #include "TelemetryScalarData.h"
-#include "ipc/TelemetryComms.h"
-#include "ipc/TelemetryIPCAccumulator.h"
 
 using mozilla::Preferences;
 using mozilla::StaticAutoPtr;
 using mozilla::StaticMutex;
 using mozilla::StaticMutexNotRecorded;
 using mozilla::StaticMutexAutoLock;
 using mozilla::Some;
 using mozilla::Nothing;
--- a/toolkit/components/telemetry/core/TelemetryScalar.h
+++ b/toolkit/components/telemetry/core/TelemetryScalar.h
@@ -1,19 +1,20 @@
 /* -*-  Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef TelemetryScalar_h__
 #define TelemetryScalar_h__
 
-#include "nsTArray.h"
+#include <stdint.h>
+#include "mozilla/TelemetryProcessEnums.h"
 #include "mozilla/TelemetryScalarEnums.h"
-#include "mozilla/TelemetryProcessEnums.h"
+#include "nsTArray.h"
 
 // This module is internal to Telemetry. It encapsulates Telemetry's
 // scalar accumulation and storage logic. It should only be used by
 // Telemetry.cpp. These functions should not be used anywhere else.
 // For the public interface to Telemetry functionality, see Telemetry.h.
 
 namespace mozilla {
 // This is only used for the GeckoView persistence.
--- a/toolkit/components/telemetry/core/ipc/TelemetryComms.h
+++ b/toolkit/components/telemetry/core/ipc/TelemetryComms.h
@@ -2,20 +2,20 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  */
 
 #ifndef Telemetry_Comms_h__
 #define Telemetry_Comms_h__
 
 #include "ipc/IPCMessageUtils.h"
+#include "mozilla/TelemetryProcessEnums.h"
+#include "mozilla/TimeStamp.h"
 #include "nsITelemetry.h"
 #include "nsVariant.h"
-#include "mozilla/TimeStamp.h"
-#include "mozilla/TelemetryProcessEnums.h"
 
 namespace mozilla {
 namespace Telemetry {
 
 // Histogram accumulation types.
 enum HistogramID : uint32_t;
 
 struct HistogramAccumulation
--- a/toolkit/components/telemetry/core/ipc/TelemetryIPC.h
+++ b/toolkit/components/telemetry/core/ipc/TelemetryIPC.h
@@ -1,19 +1,20 @@
 /* -*-  Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef TelemetryIPC_h__
 #define TelemetryIPC_h__
 
+#include <stdint.h>
+#include "mozilla/TelemetryProcessEnums.h"
 #include "nsTArray.h"
 #include "nsXULAppAPI.h"
-#include "mozilla/TelemetryProcessEnums.h"
 
 // This module provides the interface to accumulate Telemetry from child processes.
 // Top-level actors for different child processes types (ContentParent, GPUChild)
 // will call this for messages from their respective processes.
 
 namespace mozilla {
 
 namespace Telemetry {
--- a/toolkit/components/telemetry/core/ipc/TelemetryIPCAccumulator.cpp
+++ b/toolkit/components/telemetry/core/ipc/TelemetryIPCAccumulator.cpp
@@ -1,28 +1,28 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "TelemetryIPCAccumulator.h"
 
+#include "core/TelemetryHistogram.h"
+#include "core/TelemetryScalar.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/gfx/GPUParent.h"
 #include "mozilla/gfx/GPUProcessManager.h"
 #include "mozilla/StaticMutex.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/SystemGroup.h"
 #include "mozilla/Unused.h"
 #include "nsComponentManagerUtils.h"
 #include "nsITimer.h"
 #include "nsThreadUtils.h"
-#include "core/TelemetryHistogram.h"
-#include "core/TelemetryScalar.h"
 
 using mozilla::StaticMutex;
 using mozilla::StaticMutexAutoLock;
 using mozilla::StaticAutoPtr;
 using mozilla::SystemGroup;
 using mozilla::TaskCategory;
 using mozilla::Telemetry::HistogramAccumulation;
 using mozilla::Telemetry::DiscardedData;
--- a/toolkit/components/telemetry/geckoview/TelemetryGeckoViewPersistence.cpp
+++ b/toolkit/components/telemetry/geckoview/TelemetryGeckoViewPersistence.cpp
@@ -1,41 +1,41 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "TelemetryGeckoViewPersistence.h"
 
+#include "core/TelemetryHistogram.h"
+#include "core/TelemetryScalar.h"
 #include "jsapi.h"
 #include "js/JSON.h"
+#include "mozilla/dom/ScriptSettings.h" // for AutoJSAPI
+#include "mozilla/dom/SimpleGlobalObject.h"
 #include "mozilla/ErrorNames.h"
 #include "mozilla/JSONWriter.h"
 #include "mozilla/Path.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/ScopeExit.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/SystemGroup.h"
-#include "mozilla/dom/ScriptSettings.h" // for AutoJSAPI
-#include "mozilla/dom/SimpleGlobalObject.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsIFile.h"
 #include "nsIInputStream.h"
 #include "nsIObserverService.h"
 #include "nsIOutputStream.h"
 #include "nsISafeOutputStream.h"
 #include "nsITimer.h"
 #include "nsLocalFile.h"
 #include "nsNetUtil.h"
 #include "nsXULAppAPI.h"
 #include "prenv.h"
 #include "prio.h"
-#include "core/TelemetryScalar.h"
-#include "core/TelemetryHistogram.h"
 #include "xpcpublic.h"
 
 using mozilla::GetErrorName;
 using mozilla::MakeScopeExit;
 using mozilla::Preferences;
 using mozilla::StaticRefPtr;
 using mozilla::SystemGroup;
 using mozilla::TaskCategory;
--- a/toolkit/components/telemetry/geckoview/gtest/TestGeckoView.cpp
+++ b/toolkit/components/telemetry/geckoview/gtest/TestGeckoView.cpp
@@ -7,18 +7,18 @@
 #include "mozilla/JSONWriter.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsIObserver.h"
 #include "nsIObserverService.h"
 #include "nsIOutputStream.h"
 #include "nsITelemetry.h"
 #include "nsJSUtils.h"
 #include "nsNetUtil.h"
+#include "nsPrintfCString.h"
 #include "nsThreadUtils.h"
-#include "nsPrintfCString.h"
 #include "prenv.h"
 #include "mozilla/Telemetry.h"
 #include "TelemetryFixture.h"
 #include "TelemetryGeckoViewPersistence.h"
 #include "core/TelemetryScalar.h"
 #include "TelemetryTestHelpers.h"
 
 using namespace mozilla;
--- a/toolkit/components/telemetry/other/CombinedStacks.cpp
+++ b/toolkit/components/telemetry/other/CombinedStacks.cpp
@@ -1,17 +1,18 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "CombinedStacks.h"
+
+#include "jsapi.h"
 #include "mozilla/HangAnnotations.h"
-#include "jsapi.h"
 
 namespace mozilla {
 namespace Telemetry {
 
 // The maximum number of chrome hangs stacks that we're keeping.
 const size_t kMaxChromeStacksKept = 50;
 
 CombinedStacks::CombinedStacks()
--- a/toolkit/components/telemetry/other/KeyedStackCapturer.cpp
+++ b/toolkit/components/telemetry/other/KeyedStackCapturer.cpp
@@ -1,19 +1,20 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "KeyedStackCapturer.h"
-#include "nsPrintfCString.h"
+
+#include "jsapi.h"
 #include "mozilla/StackWalk.h"
+#include "nsPrintfCString.h"
 #include "ProcessedStack.h"
-#include "jsapi.h"
 
 namespace {
 
 /** Defines the size of the keyed stack dictionary. */
 const uint8_t kMaxKeyLength = 50;
 
 /** The maximum number of captured stacks that we're keeping. */
 const size_t kMaxCapturedStacksKept = 50;
--- a/toolkit/components/telemetry/other/KeyedStackCapturer.h
+++ b/toolkit/components/telemetry/other/KeyedStackCapturer.h
@@ -1,21 +1,21 @@
 /* -*-  Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef KeyedStackCapturer_h__
 #define KeyedStackCapturer_h__
 
+#include "CombinedStacks.h"
+#include "mozilla/Mutex.h"
 #include "mozilla/Telemetry.h"
-#include "nsString.h"
 #include "nsClassHashtable.h"
-#include "mozilla/Mutex.h"
-#include "CombinedStacks.h"
+#include "nsString.h"
 
 struct JSContext;
 
 namespace mozilla {
 namespace Telemetry {
 
 /**
 * Allows taking a snapshot of a call stack on demand. Captured stacks are
--- a/toolkit/components/telemetry/other/TelemetryIOInterposeObserver.h
+++ b/toolkit/components/telemetry/other/TelemetryIOInterposeObserver.h
@@ -8,25 +8,24 @@
 /**
  * IOInterposeObserver recording statistics of main-thread I/O during execution,
  * aimed at consumption by TelemetryImpl
  */
 
 #ifndef TelemetryIOInterposeObserver_h__
 #define TelemetryIOInterposeObserver_h__
 
+#include "core/TelemetryCommon.h"
 #include "jsapi.h"
+#include "mozilla/IOInterposer.h"
+#include "nsBaseHashtable.h"
+#include "nsClassHashtable.h"
+#include "nsHashKeys.h"
 #include "nsTArray.h"
 #include "nsTHashtable.h"
-#include "nsHashKeys.h"
-#include "nsBaseHashtable.h"
-#include "nsClassHashtable.h"
-
-#include "core/TelemetryCommon.h"
-#include "mozilla/IOInterposer.h"
 
 namespace mozilla {
 namespace Telemetry {
 
 class TelemetryIOInterposeObserver : public IOInterposeObserver
 {
   /** File-level statistics structure */
   struct FileStats {
--- a/toolkit/components/telemetry/other/WebrtcTelemetry.cpp
+++ b/toolkit/components/telemetry/other/WebrtcTelemetry.cpp
@@ -1,21 +1,20 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#include "WebrtcTelemetry.h"
 
+#include "jsapi.h"
 #include "mozilla/Telemetry.h"
-#include "WebrtcTelemetry.h"
-#include "jsapi.h"
 #include "nsPrintfCString.h"
 #include "nsTHashtable.h"
-
 void
 WebrtcTelemetry::RecordIceCandidateMask(const uint32_t iceCandidateBitmask,
                                         const bool success)
 {
   WebrtcIceCandidateType *entry = mWebrtcIceCandidates.GetEntry(iceCandidateBitmask);
   if (!entry) {
     entry = mWebrtcIceCandidates.PutEntry(iceCandidateBitmask);
     if (MOZ_UNLIKELY(!entry))
--- a/toolkit/components/telemetry/pingsender/pingsender_unix_common.cpp
+++ b/toolkit/components/telemetry/pingsender/pingsender_unix_common.cpp
@@ -1,24 +1,21 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include <cerrno>
 #include <cstring>
+#include <dlfcn.h>
 #include <string>
-
-#include <dlfcn.h>
 #include <unistd.h>
-
+#include "mozilla/Unused.h"
 #include "third_party/curl/curl.h"
 
-#include "mozilla/Unused.h"
-
 namespace PingSender {
 
 using std::string;
 
 using mozilla::Unused;
 
 /**
  * A simple wrapper around libcurl "easy" functions. Provides RAII opening
--- a/toolkit/components/telemetry/tests/gtest/TelemetryFixture.h
+++ b/toolkit/components/telemetry/tests/gtest/TelemetryFixture.h
@@ -1,19 +1,19 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 #ifndef TelemetryFixture_h_
 #define TelemetryFixture_h_
 
 #include "gtest/gtest.h"
-#include "nsITelemetry.h"
 #include "mozilla/CycleCollectedJSContext.h"
 #include "mozilla/dom/ScriptSettings.h"
+#include "nsITelemetry.h"
 
 class TelemetryTestFixture: public ::testing::Test {
 protected:
   TelemetryTestFixture() : mCleanGlobal(nullptr) {}
   virtual void SetUp();
 
   JSObject* mCleanGlobal;
 
--- a/toolkit/components/telemetry/tests/gtest/TelemetryTestHelpers.cpp
+++ b/toolkit/components/telemetry/tests/gtest/TelemetryTestHelpers.cpp
@@ -1,17 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 #include "TelemetryTestHelpers.h"
 
+#include "core/TelemetryCommon.h"
 #include "gtest/gtest.h"
 #include "mozilla/CycleCollectedJSContext.h"
-#include "core/TelemetryCommon.h"
 #include "mozilla/Unused.h"
 
 using namespace mozilla;
 
 // Helper methods provided to simplify writing tests and meant to be used in C++ Gtests.
 namespace TelemetryTestHelpers {
 
 void
--- a/toolkit/components/telemetry/tests/gtest/TestCounters.cpp
+++ b/toolkit/components/telemetry/tests/gtest/TestCounters.cpp
@@ -1,17 +1,17 @@
 /* vim:set ts=2 sw=2 sts=0 et: */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 #include "gtest/gtest.h"
 #include "js/Conversions.h"
+#include "mozilla/Telemetry.h"
 #include "nsITelemetry.h"
-#include "mozilla/Telemetry.h"
 #include "TelemetryFixture.h"
 #include "TelemetryTestHelpers.h"
 
 using namespace mozilla;
 using namespace TelemetryTestHelpers;
 
 TEST_F(TelemetryTestFixture, AutoCounter)
 {
--- a/toolkit/components/telemetry/tests/gtest/TestHistograms.cpp
+++ b/toolkit/components/telemetry/tests/gtest/TestHistograms.cpp
@@ -1,17 +1,17 @@
 /* vim:set ts=2 sw=2 sts=0 et: */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 #include "gtest/gtest.h"
 #include "js/Conversions.h"
+#include "mozilla/Telemetry.h"
 #include "nsITelemetry.h"
-#include "mozilla/Telemetry.h"
 #include "TelemetryFixture.h"
 #include "TelemetryTestHelpers.h"
 
 using namespace mozilla;
 using namespace TelemetryTestHelpers;
 
 TEST_F(TelemetryTestFixture, AccumulateCountHistogram)
 {
--- a/toolkit/components/telemetry/tests/gtest/TestScalars.cpp
+++ b/toolkit/components/telemetry/tests/gtest/TestScalars.cpp
@@ -1,24 +1,23 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
+#include "core/TelemetryScalar.h"
 #include "gtest/gtest.h"
-
 #include "js/Conversions.h"
+#include "mozilla/Telemetry.h"
+#include "mozilla/TelemetryProcessEnums.h"
 #include "mozilla/Unused.h"
 #include "nsJSUtils.h" // nsAutoJSString
 #include "nsITelemetry.h"
 #include "nsThreadUtils.h"
-#include "mozilla/Telemetry.h"
-#include "mozilla/TelemetryProcessEnums.h"
 #include "TelemetryFixture.h"
-#include "core/TelemetryScalar.h"
 #include "TelemetryTestHelpers.h"
 
 using namespace mozilla;
 using namespace TelemetryTestHelpers;
 using mozilla::Telemetry::ProcessID;
 
 #define EXPECTED_STRING "Nice, expected and creative string."