diff --git a/ipc/glue/MessageChannel.cpp b/ipc/glue/MessageChannel.cpp index 655f51e4844..9f14a7b7bbc 100644 --- a/ipc/glue/MessageChannel.cpp +++ b/ipc/glue/MessageChannel.cpp @@ -753,7 +753,7 @@ MessageChannel::Send(Message* aMsg) { if (aMsg->capacity() >= kMinTelemetryMessageSize) { Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE, - nsCString(aMsg->name()), aMsg->capacity()); + nsDependentCString(aMsg->name()), aMsg->capacity()); } CxxStackFrame frame(*this, OUT_MESSAGE, aMsg); @@ -1042,7 +1042,7 @@ MessageChannel::Send(Message* aMsg, Message* aReply) { if (aMsg->capacity() >= kMinTelemetryMessageSize) { Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE, - nsCString(aMsg->name()), aMsg->capacity()); + nsDependentCString(aMsg->name()), aMsg->capacity()); } nsAutoPtr msg(aMsg); @@ -1227,6 +1227,10 @@ MessageChannel::Send(Message* aMsg, Message* aReply) MOZ_RELEASE_ASSERT(reply->is_sync()); *aReply = Move(*reply); + if (aReply->capacity() >= kMinTelemetryMessageSize) { + Telemetry::Accumulate(Telemetry::IPC_REPLY_SIZE, + nsDependentCString(aReply->name()), aReply->capacity()); + } return true; } diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index f91f646ff04..b416c3ddb14 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -10428,6 +10428,16 @@ "keyed": true, "description": "Measures the size of IPC messages by message name" }, + "IPC_REPLY_SIZE": { + "alert_emails": ["wmccloskey@mozilla.com"], + "bug_numbers": [1264820], + "expires_in_version": "55", + "kind": "exponential", + "high": 8000000, + "n_buckets": 50, + "keyed": true, + "description": "Measures the size of IPC messages by message name" + }, "MESSAGE_MANAGER_MESSAGE_SIZE": { "alert_emails": ["wmccloskey@mozilla.com"], "bug_numbers": [1260908],