Backed out changeset 9cf5185e6d6f (bug 1361661)

This commit is contained in:
Sebastian Hengst 2017-05-22 16:19:26 +02:00
Родитель 792f97a0c1
Коммит b3a2c130d0
4 изменённых файлов: 20 добавлений и 37 удалений

Просмотреть файл

@ -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*>* ContentParent::sPrivateContent;
@ -5137,7 +5126,7 @@ mozilla::ipc::IPCResult
ContentParent::RecvAccumulateChildHistograms(
InfallibleTArray<Accumulation>&& aAccumulations)
{
TelemetryIPC::AccumulateChildHistograms(GetTelemetryProcessID(mRemoteType), aAccumulations);
TelemetryIPC::AccumulateChildHistograms(GeckoProcessType_Content, aAccumulations);
return IPC_OK();
}
@ -5145,7 +5134,7 @@ mozilla::ipc::IPCResult
ContentParent::RecvAccumulateChildKeyedHistograms(
InfallibleTArray<KeyedAccumulation>&& aAccumulations)
{
TelemetryIPC::AccumulateChildKeyedHistograms(GetTelemetryProcessID(mRemoteType), aAccumulations);
TelemetryIPC::AccumulateChildKeyedHistograms(GeckoProcessType_Content, aAccumulations);
return IPC_OK();
}
@ -5153,7 +5142,7 @@ mozilla::ipc::IPCResult
ContentParent::RecvUpdateChildScalars(
InfallibleTArray<ScalarAction>&& aScalarActions)
{
TelemetryIPC::UpdateChildScalars(GetTelemetryProcessID(mRemoteType), aScalarActions);
TelemetryIPC::UpdateChildScalars(GeckoProcessType_Content, aScalarActions);
return IPC_OK();
}
@ -5161,14 +5150,14 @@ mozilla::ipc::IPCResult
ContentParent::RecvUpdateChildKeyedScalars(
InfallibleTArray<KeyedScalarAction>&& aScalarActions)
{
TelemetryIPC::UpdateChildKeyedScalars(GetTelemetryProcessID(mRemoteType), aScalarActions);
TelemetryIPC::UpdateChildKeyedScalars(GeckoProcessType_Content, aScalarActions);
return IPC_OK();
}
mozilla::ipc::IPCResult
ContentParent::RecvRecordChildEvents(nsTArray<mozilla::Telemetry::ChildEventData>&& aEvents)
{
TelemetryIPC::RecordChildEvents(GetTelemetryProcessID(mRemoteType), aEvents);
TelemetryIPC::RecordChildEvents(GeckoProcessType_Content, aEvents);
return IPC_OK();
}

Просмотреть файл

@ -165,35 +165,35 @@ GPUChild::RecvNotifyUiObservers(const nsCString& aTopic)
mozilla::ipc::IPCResult
GPUChild::RecvAccumulateChildHistograms(InfallibleTArray<Accumulation>&& aAccumulations)
{
TelemetryIPC::AccumulateChildHistograms(Telemetry::ProcessID::Gpu, aAccumulations);
TelemetryIPC::AccumulateChildHistograms(GeckoProcessType_GPU, aAccumulations);
return IPC_OK();
}
mozilla::ipc::IPCResult
GPUChild::RecvAccumulateChildKeyedHistograms(InfallibleTArray<KeyedAccumulation>&& aAccumulations)
{
TelemetryIPC::AccumulateChildKeyedHistograms(Telemetry::ProcessID::Gpu, aAccumulations);
TelemetryIPC::AccumulateChildKeyedHistograms(GeckoProcessType_GPU, aAccumulations);
return IPC_OK();
}
mozilla::ipc::IPCResult
GPUChild::RecvUpdateChildScalars(InfallibleTArray<ScalarAction>&& aScalarActions)
{
TelemetryIPC::UpdateChildScalars(Telemetry::ProcessID::Gpu, aScalarActions);
TelemetryIPC::UpdateChildScalars(GeckoProcessType_GPU, aScalarActions);
return IPC_OK();
}
mozilla::ipc::IPCResult
GPUChild::RecvUpdateChildKeyedScalars(InfallibleTArray<KeyedScalarAction>&& aScalarActions)
{
TelemetryIPC::UpdateChildKeyedScalars(Telemetry::ProcessID::Gpu, aScalarActions);
TelemetryIPC::UpdateChildKeyedScalars(GeckoProcessType_GPU, aScalarActions);
return IPC_OK();
}
mozilla::ipc::IPCResult
GPUChild::RecvRecordChildEvents(nsTArray<mozilla::Telemetry::ChildEventData>&& aEvents)
{
TelemetryIPC::RecordChildEvents(Telemetry::ProcessID::Gpu, aEvents);
TelemetryIPC::RecordChildEvents(GeckoProcessType_GPU, aEvents);
return IPC_OK();
}

Просмотреть файл

@ -12,35 +12,35 @@
namespace mozilla {
void
TelemetryIPC::AccumulateChildHistograms(Telemetry::ProcessID aProcessType,
TelemetryIPC::AccumulateChildHistograms(GeckoProcessType aProcessType,
const nsTArray<Telemetry::Accumulation>& aAccumulations)
{
TelemetryHistogram::AccumulateChild(aProcessType, aAccumulations);
}
void
TelemetryIPC::AccumulateChildKeyedHistograms(Telemetry::ProcessID aProcessType,
TelemetryIPC::AccumulateChildKeyedHistograms(GeckoProcessType aProcessType,
const nsTArray<Telemetry::KeyedAccumulation>& aAccumulations)
{
TelemetryHistogram::AccumulateChildKeyed(aProcessType, aAccumulations);
}
void
TelemetryIPC::UpdateChildScalars(Telemetry::ProcessID aProcessType,
TelemetryIPC::UpdateChildScalars(GeckoProcessType aProcessType,
const nsTArray<Telemetry::ScalarAction>& aScalarActions)
{
TelemetryScalar::UpdateChildData(aProcessType, aScalarActions);
}
void
TelemetryIPC::UpdateChildKeyedScalars(Telemetry::ProcessID aProcessType,
TelemetryIPC::UpdateChildKeyedScalars(GeckoProcessType aProcessType,
const nsTArray<Telemetry::KeyedScalarAction>& aScalarActions)
{
TelemetryScalar::UpdateChildKeyedData(aProcessType, aScalarActions);
}
void
TelemetryIPC::RecordChildEvents(Telemetry::ProcessID aProcessType, const nsTArray<Telemetry::ChildEventData>& aEvents)
TelemetryIPC::RecordChildEvents(GeckoProcessType aProcessType, const nsTArray<Telemetry::ChildEventData>& aEvents)
{
TelemetryEvent::RecordChildEvents(aProcessType, aEvents);
}

Просмотреть файл

@ -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<Telemetry::Accumulation>& aAccumulations);
void AccumulateChildHistograms(GeckoProcessType aProcessType, const nsTArray<Telemetry::Accumulation>& 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<Telemetry::KeyedAccumulation>& aAccumulations);
void AccumulateChildKeyedHistograms(GeckoProcessType aProcessType, const nsTArray<Telemetry::KeyedAccumulation>& 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<Telemetry::ScalarAction>& aScalarActions);
void UpdateChildScalars(GeckoProcessType aProcessType, const nsTArray<Telemetry::ScalarAction>& 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<Telemetry::KeyedScalarAction>& aScalarActions);
void UpdateChildKeyedScalars(GeckoProcessType aProcessType, const nsTArray<Telemetry::KeyedScalarAction>& 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<Telemetry::ChildEventData>& aEvents);
void RecordChildEvents(GeckoProcessType aProcessType, const nsTArray<Telemetry::ChildEventData>& aEvents);
}
}