зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1353159 - Use IPC_MESSAGE_SIZE2 to unify the expired IPC_MESSAGE_SIZE and MESSAGE_MANAGER_MESSAGE_SIZE2 r=billm
The new telemetry tag is for probing the best IPC message pre-allocate size to avoid realloc overhead. We only count those message size which is greater than 4096. This tag integrates IPC_MESSAGE_SIZE and MESSAGE_MANAGER_MESSAGE_SIZE2 which have both expired. MozReview-Commit-ID: GjvuidGJ7pz --HG-- extra : rebase_source : 1da13b3f2b5b042d0445abd6051993e2fb317f93
This commit is contained in:
Родитель
bc058622e6
Коммит
3f6c2504c6
|
@ -577,18 +577,6 @@ nsFrameMessageManager::SendRpcMessage(const nsAString& aMessageName,
|
|||
static bool
|
||||
AllowMessage(size_t aDataLength, const nsAString& aMessageName)
|
||||
{
|
||||
static const size_t kMinTelemetryMessageSize = 8192;
|
||||
|
||||
if (aDataLength < kMinTelemetryMessageSize) {
|
||||
return true;
|
||||
}
|
||||
|
||||
NS_ConvertUTF16toUTF8 messageName(aMessageName);
|
||||
messageName.StripChars("0123456789");
|
||||
|
||||
Telemetry::Accumulate(Telemetry::MESSAGE_MANAGER_MESSAGE_SIZE2, messageName,
|
||||
aDataLength);
|
||||
|
||||
// A message includes more than structured clone data, so subtract
|
||||
// 20KB to make it more likely that a message within this bound won't
|
||||
// result in an overly large IPC message.
|
||||
|
@ -597,6 +585,9 @@ AllowMessage(size_t aDataLength, const nsAString& aMessageName)
|
|||
return true;
|
||||
}
|
||||
|
||||
NS_ConvertUTF16toUTF8 messageName(aMessageName);
|
||||
messageName.StripChars("0123456789");
|
||||
|
||||
Telemetry::Accumulate(Telemetry::REJECTED_MESSAGE_MANAGER_MESSAGE,
|
||||
messageName);
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ static MessageChannel* gParentProcessBlocker;
|
|||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
||||
static const uint32_t kMinTelemetryMessageSize = 8192;
|
||||
static const uint32_t kMinTelemetryMessageSize = 4096;
|
||||
|
||||
// Note: we round the time we spend to the nearest millisecond. So a min value
|
||||
// of 1 ms actually captures from 500us and above.
|
||||
|
@ -873,8 +873,7 @@ bool
|
|||
MessageChannel::Send(Message* aMsg)
|
||||
{
|
||||
if (aMsg->size() >= kMinTelemetryMessageSize) {
|
||||
Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE,
|
||||
nsDependentCString(aMsg->name()), aMsg->size());
|
||||
Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE2, aMsg->size());
|
||||
}
|
||||
|
||||
// If the message was created by the IPC bindings, the create time will be
|
||||
|
@ -1294,8 +1293,7 @@ MessageChannel::Send(Message* aMsg, Message* aReply)
|
|||
{
|
||||
mozilla::TimeStamp start = TimeStamp::Now();
|
||||
if (aMsg->size() >= kMinTelemetryMessageSize) {
|
||||
Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE,
|
||||
nsDependentCString(aMsg->name()), aMsg->size());
|
||||
Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE2, aMsg->size());
|
||||
}
|
||||
|
||||
nsAutoPtr<Message> msg(aMsg);
|
||||
|
|
|
@ -10737,15 +10737,15 @@
|
|||
"n_values": 10,
|
||||
"description": "Media decoder backend (0=WMF Software, 1=DXVA2D3D9, 2=DXVA2D3D11)"
|
||||
},
|
||||
"IPC_MESSAGE_SIZE": {
|
||||
"alert_emails": ["wmccloskey@mozilla.com"],
|
||||
"bug_numbers": [1260908],
|
||||
"expires_in_version": "55",
|
||||
"IPC_MESSAGE_SIZE2": {
|
||||
"alert_emails": ["hchang@mozilla.com"],
|
||||
"bug_numbers": [1353159],
|
||||
"expires_in_version": "60",
|
||||
"kind": "exponential",
|
||||
"high": 8000000,
|
||||
"n_buckets": 50,
|
||||
"keyed": true,
|
||||
"description": "Measures the size of IPC messages by message name"
|
||||
"keyed": false,
|
||||
"description": "Measures the size of all IPC messages sent that are >= 4096 bytes."
|
||||
},
|
||||
"IPC_REPLY_SIZE": {
|
||||
"alert_emails": ["wmccloskey@mozilla.com"],
|
||||
|
@ -10768,17 +10768,6 @@
|
|||
"keyed": true,
|
||||
"description": "Measures the number of milliseconds we spend waiting for sync IPC messages to finish sending, keyed by message name. Note: only messages that wait for more than 500 microseconds and block the main thread are included in this probe."
|
||||
},
|
||||
"MESSAGE_MANAGER_MESSAGE_SIZE2": {
|
||||
"alert_emails": ["wmccloskey@mozilla.com","amccreight@mozilla.com"],
|
||||
"bug_numbers": [1260908],
|
||||
"expires_in_version": "55",
|
||||
"kind": "exponential",
|
||||
"low": 8192,
|
||||
"high": 8000000,
|
||||
"n_buckets": 50,
|
||||
"keyed": true,
|
||||
"description": "Each key is the message name, with digits removed, from an async message manager message that was larger than 8192 bytes, recorded in the sending process at the time of sending."
|
||||
},
|
||||
"REJECTED_MESSAGE_MANAGER_MESSAGE": {
|
||||
"alert_emails": ["amccreight@mozilla.com"],
|
||||
"bug_numbers": [1272423],
|
||||
|
|
Загрузка…
Ссылка в новой задаче