summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-22 22:39:57 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-22 22:39:57 +0000
commit60b2c61f99522724d8093ea742dd934fb95c1b0e (patch)
tree86b0ca1e0ca665ef2d2a4dd5022ea0cb3f5f0c13 /ipc
parentb1d7844badcdcca2d9c744a417785d5d0bace305 (diff)
downloadchromium_src-60b2c61f99522724d8093ea742dd934fb95c1b0e.zip
chromium_src-60b2c61f99522724d8093ea742dd934fb95c1b0e.tar.gz
chromium_src-60b2c61f99522724d8093ea742dd934fb95c1b0e.tar.bz2
Add traces for SyncChannel::SendWithTimeout
BUG=None Review URL: https://chromiumcodereview.appspot.com/10831415 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152841 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_sync_channel.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index 47d51b4..a300c0f 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/ipc/ipc_sync_channel.cc
@@ -5,6 +5,7 @@
#include "ipc/ipc_sync_channel.h"
#include "base/bind.h"
+#include "base/debug/trace_event.h"
#include "base/lazy_instance.h"
#include "base/location.h"
#include "base/logging.h"
@@ -12,6 +13,8 @@
#include "base/synchronization/waitable_event_watcher.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_local.h"
+#include "ipc/ipc_logging.h"
+#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_sync_message.h"
using base::TimeDelta;
@@ -428,6 +431,17 @@ bool SyncChannel::Send(Message* message) {
}
bool SyncChannel::SendWithTimeout(Message* message, int timeout_ms) {
+#ifdef IPC_MESSAGE_LOG_ENABLED
+ Logging* logger = Logging::GetInstance();
+ std::string name;
+ logger->GetMessageText(message->type(), &name, message, NULL);
+ TRACE_EVENT1("task", "SyncChannel::SendWithTimeout",
+ "name", name);
+#else
+ TRACE_EVENT2("task", "SyncChannel::SendWithTimeout",
+ "class", IPC_MESSAGE_ID_CLASS(message->type()),
+ "line", IPC_MESSAGE_ID_LINE(message->type()));
+#endif
if (!message->is_sync()) {
ChannelProxy::Send(message);
return true;