diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 21d7191e73ce..ab2fde5f1a3d 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -286,7 +286,6 @@ using namespace mozilla::jsipc; using namespace mozilla::psm; using namespace mozilla::widget; using mozilla::loader::PScriptCacheParent; -using mozilla::Telemetry::ProcessID; // XXX Workaround for bug 986973 to maintain the existing broken semantics template<> @@ -534,16 +533,6 @@ ScriptableCPInfo::GetMessageManager(nsIMessageSender** aMessenger) return NS_OK; } -ProcessID -GetTelemetryProcessID(const nsAString& remoteType) -{ - // OOP WebExtensions run in a content process. - // For Telemetry though we want to break out collected data from the WebExtensions process into - // a separate bucket, to make sure we can analyze it separately and avoid skewing normal content - // process metrics. - return remoteType.EqualsLiteral(EXTENSION_REMOTE_TYPE) ? ProcessID::Extension : ProcessID::Content; -} - } // anonymous namespace nsTArray* ContentParent::sPrivateContent; @@ -5137,7 +5126,7 @@ mozilla::ipc::IPCResult ContentParent::RecvAccumulateChildHistograms( InfallibleTArray&& aAccumulations) { - TelemetryIPC::AccumulateChildHistograms(GetTelemetryProcessID(mRemoteType), aAccumulations); + TelemetryIPC::AccumulateChildHistograms(GeckoProcessType_Content, aAccumulations); return IPC_OK(); } @@ -5145,7 +5134,7 @@ mozilla::ipc::IPCResult ContentParent::RecvAccumulateChildKeyedHistograms( InfallibleTArray&& aAccumulations) { - TelemetryIPC::AccumulateChildKeyedHistograms(GetTelemetryProcessID(mRemoteType), aAccumulations); + TelemetryIPC::AccumulateChildKeyedHistograms(GeckoProcessType_Content, aAccumulations); return IPC_OK(); } @@ -5153,7 +5142,7 @@ mozilla::ipc::IPCResult ContentParent::RecvUpdateChildScalars( InfallibleTArray&& aScalarActions) { - TelemetryIPC::UpdateChildScalars(GetTelemetryProcessID(mRemoteType), aScalarActions); + TelemetryIPC::UpdateChildScalars(GeckoProcessType_Content, aScalarActions); return IPC_OK(); } @@ -5161,14 +5150,14 @@ mozilla::ipc::IPCResult ContentParent::RecvUpdateChildKeyedScalars( InfallibleTArray&& aScalarActions) { - TelemetryIPC::UpdateChildKeyedScalars(GetTelemetryProcessID(mRemoteType), aScalarActions); + TelemetryIPC::UpdateChildKeyedScalars(GeckoProcessType_Content, aScalarActions); return IPC_OK(); } mozilla::ipc::IPCResult ContentParent::RecvRecordChildEvents(nsTArray&& aEvents) { - TelemetryIPC::RecordChildEvents(GetTelemetryProcessID(mRemoteType), aEvents); + TelemetryIPC::RecordChildEvents(GeckoProcessType_Content, aEvents); return IPC_OK(); } diff --git a/gfx/ipc/GPUChild.cpp b/gfx/ipc/GPUChild.cpp index 851c0cb2a7b4..d1d52da6ebaf 100644 --- a/gfx/ipc/GPUChild.cpp +++ b/gfx/ipc/GPUChild.cpp @@ -165,35 +165,35 @@ GPUChild::RecvNotifyUiObservers(const nsCString& aTopic) mozilla::ipc::IPCResult GPUChild::RecvAccumulateChildHistograms(InfallibleTArray&& aAccumulations) { - TelemetryIPC::AccumulateChildHistograms(Telemetry::ProcessID::Gpu, aAccumulations); + TelemetryIPC::AccumulateChildHistograms(GeckoProcessType_GPU, aAccumulations); return IPC_OK(); } mozilla::ipc::IPCResult GPUChild::RecvAccumulateChildKeyedHistograms(InfallibleTArray&& aAccumulations) { - TelemetryIPC::AccumulateChildKeyedHistograms(Telemetry::ProcessID::Gpu, aAccumulations); + TelemetryIPC::AccumulateChildKeyedHistograms(GeckoProcessType_GPU, aAccumulations); return IPC_OK(); } mozilla::ipc::IPCResult GPUChild::RecvUpdateChildScalars(InfallibleTArray&& aScalarActions) { - TelemetryIPC::UpdateChildScalars(Telemetry::ProcessID::Gpu, aScalarActions); + TelemetryIPC::UpdateChildScalars(GeckoProcessType_GPU, aScalarActions); return IPC_OK(); } mozilla::ipc::IPCResult GPUChild::RecvUpdateChildKeyedScalars(InfallibleTArray&& aScalarActions) { - TelemetryIPC::UpdateChildKeyedScalars(Telemetry::ProcessID::Gpu, aScalarActions); + TelemetryIPC::UpdateChildKeyedScalars(GeckoProcessType_GPU, aScalarActions); return IPC_OK(); } mozilla::ipc::IPCResult GPUChild::RecvRecordChildEvents(nsTArray&& aEvents) { - TelemetryIPC::RecordChildEvents(Telemetry::ProcessID::Gpu, aEvents); + TelemetryIPC::RecordChildEvents(GeckoProcessType_GPU, aEvents); return IPC_OK(); } diff --git a/toolkit/components/telemetry/ipc/TelemetryIPC.cpp b/toolkit/components/telemetry/ipc/TelemetryIPC.cpp index fe531f3e961a..c1cb1f4c4da1 100644 --- a/toolkit/components/telemetry/ipc/TelemetryIPC.cpp +++ b/toolkit/components/telemetry/ipc/TelemetryIPC.cpp @@ -12,35 +12,35 @@ namespace mozilla { void -TelemetryIPC::AccumulateChildHistograms(Telemetry::ProcessID aProcessType, +TelemetryIPC::AccumulateChildHistograms(GeckoProcessType aProcessType, const nsTArray& aAccumulations) { TelemetryHistogram::AccumulateChild(aProcessType, aAccumulations); } void -TelemetryIPC::AccumulateChildKeyedHistograms(Telemetry::ProcessID aProcessType, +TelemetryIPC::AccumulateChildKeyedHistograms(GeckoProcessType aProcessType, const nsTArray& aAccumulations) { TelemetryHistogram::AccumulateChildKeyed(aProcessType, aAccumulations); } void -TelemetryIPC::UpdateChildScalars(Telemetry::ProcessID aProcessType, +TelemetryIPC::UpdateChildScalars(GeckoProcessType aProcessType, const nsTArray& aScalarActions) { TelemetryScalar::UpdateChildData(aProcessType, aScalarActions); } void -TelemetryIPC::UpdateChildKeyedScalars(Telemetry::ProcessID aProcessType, +TelemetryIPC::UpdateChildKeyedScalars(GeckoProcessType aProcessType, const nsTArray& aScalarActions) { TelemetryScalar::UpdateChildKeyedData(aProcessType, aScalarActions); } void -TelemetryIPC::RecordChildEvents(Telemetry::ProcessID aProcessType, const nsTArray& aEvents) +TelemetryIPC::RecordChildEvents(GeckoProcessType aProcessType, const nsTArray& aEvents) { TelemetryEvent::RecordChildEvents(aProcessType, aEvents); } diff --git a/toolkit/components/telemetry/ipc/TelemetryIPC.h b/toolkit/components/telemetry/ipc/TelemetryIPC.h index ac3097c4a56d..b800e1f1910d 100644 --- a/toolkit/components/telemetry/ipc/TelemetryIPC.h +++ b/toolkit/components/telemetry/ipc/TelemetryIPC.h @@ -8,7 +8,6 @@ #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) @@ -33,8 +32,7 @@ namespace TelemetryIPC { * @param aProcessType - the process type to accumulate the histograms for * @param aAccumulations - accumulation actions to perform */ -void AccumulateChildHistograms(Telemetry::ProcessID aProcessType, - const nsTArray& aAccumulations); +void AccumulateChildHistograms(GeckoProcessType aProcessType, const nsTArray& aAccumulations); /** * Accumulate child process data into keyed histograms for the given process type. @@ -42,8 +40,7 @@ void AccumulateChildHistograms(Telemetry::ProcessID aProcessType, * @param aProcessType - the process type to accumulate the keyed histograms for * @param aAccumulations - accumulation actions to perform */ -void AccumulateChildKeyedHistograms(Telemetry::ProcessID aProcessType, - const nsTArray& aAccumulations); +void AccumulateChildKeyedHistograms(GeckoProcessType aProcessType, const nsTArray& aAccumulations); /** * Update scalars for the given process type with the data coming from child process. @@ -51,8 +48,7 @@ void AccumulateChildKeyedHistograms(Telemetry::ProcessID aProcessType, * @param aProcessType - the process type to process the scalar actions for * @param aScalarActions - actions to update the scalar data */ -void UpdateChildScalars(Telemetry::ProcessID aProcessType, - const nsTArray& aScalarActions); +void UpdateChildScalars(GeckoProcessType aProcessType, const nsTArray& aScalarActions); /** * Update keyed scalars for the given process type with the data coming from child process. @@ -60,8 +56,7 @@ void UpdateChildScalars(Telemetry::ProcessID aProcessType, * @param aProcessType - the process type to process the keyed scalar actions for * @param aScalarActions - actions to update the keyed scalar data */ -void UpdateChildKeyedScalars(Telemetry::ProcessID aProcessType, - const nsTArray& aScalarActions); +void UpdateChildKeyedScalars(GeckoProcessType aProcessType, const nsTArray& aScalarActions); /** * Record events for the given process type with the data coming from child process. @@ -69,8 +64,7 @@ void UpdateChildKeyedScalars(Telemetry::ProcessID aProcessType, * @param aProcessType - the process type to record the events for * @param aEvents - events to record */ -void RecordChildEvents(Telemetry::ProcessID aProcessType, - const nsTArray& aEvents); +void RecordChildEvents(GeckoProcessType aProcessType, const nsTArray& aEvents); } }