summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authormorrita <morrita@chromium.org>2014-12-17 11:01:40 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-17 19:03:11 +0000
commit7126b7a18c495341684a4d6c48311174e6b0a0be (patch)
tree17faf9c321b26b5ac13df0b9b7886ad7cf5f2757 /ipc
parent982674774e04e8d4e1f061c407f9ef855cd9c98a (diff)
downloadchromium_src-7126b7a18c495341684a4d6c48311174e6b0a0be.zip
chromium_src-7126b7a18c495341684a4d6c48311174e6b0a0be.tar.gz
chromium_src-7126b7a18c495341684a4d6c48311174e6b0a0be.tar.bz2
IPC::ChannelMojo: Add a trace
This is equivalent to the one in IPC::ChannelReader::DispatchInputData(). It's useful to have this for comparing perf difference between Mojo and non-Mojo versions. R=viettrungluu@chromium.org BUG= Review URL: https://codereview.chromium.org/799183003 Cr-Commit-Position: refs/heads/master@{#308831}
Diffstat (limited to 'ipc')
-rw-r--r--ipc/mojo/ipc_channel_mojo.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipc/mojo/ipc_channel_mojo.cc b/ipc/mojo/ipc_channel_mojo.cc
index 3b646c7..8375cb4 100644
--- a/ipc/mojo/ipc_channel_mojo.cc
+++ b/ipc/mojo/ipc_channel_mojo.cc
@@ -8,6 +8,8 @@
#include "base/bind_helpers.h"
#include "base/lazy_instance.h"
#include "ipc/ipc_listener.h"
+#include "ipc/ipc_logging.h"
+#include "ipc/ipc_message_macros.h"
#include "ipc/mojo/client_channel.mojom.h"
#include "ipc/mojo/ipc_mojo_bootstrap.h"
#include "mojo/edk/embedder/embedder.h"
@@ -320,6 +322,9 @@ void ChannelMojo::OnClientLaunched(base::ProcessHandle handle) {
}
void ChannelMojo::OnMessageReceived(Message& message) {
+ TRACE_EVENT2("ipc,toplevel", "ChannelMojo::OnMessageReceived",
+ "class", IPC_MESSAGE_ID_CLASS(message.type()),
+ "line", IPC_MESSAGE_ID_LINE(message.type()));
listener_->OnMessageReceived(message);
if (message.dispatch_error())
listener_->OnBadMessageReceived(message);