summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_reader.cc
diff options
context:
space:
mode:
authorjbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-18 03:41:29 +0000
committerjbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-18 03:41:29 +0000
commit2c391df878dc6187bbb8a26d34260ed46f18d139 (patch)
treee50370b6faf481726d7b7810f4b89dd55be7d494 /ipc/ipc_channel_reader.cc
parent108a0513d108857ba2e943b8f70bd68dc3a98a18 (diff)
downloadchromium_src-2c391df878dc6187bbb8a26d34260ed46f18d139.zip
chromium_src-2c391df878dc6187bbb8a26d34260ed46f18d139.tar.gz
chromium_src-2c391df878dc6187bbb8a26d34260ed46f18d139.tar.bz2
Trace PostTasks from post to run.
To do this properly, we need a new type of trace event "FLOW" which will be drawn as lines in about:tracing from BEGIN to END. Also instruments SequencedWorkerPool and ChannelReader::DispatchInputData, which were not currently traced. BUG=79942 Review URL: https://codereview.chromium.org/10913242 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_reader.cc')
-rw-r--r--ipc/ipc_channel_reader.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/ipc/ipc_channel_reader.cc b/ipc/ipc_channel_reader.cc
index 8e8b6a65..2f291a9 100644
--- a/ipc/ipc_channel_reader.cc
+++ b/ipc/ipc_channel_reader.cc
@@ -4,6 +4,9 @@
#include "ipc/ipc_channel_reader.h"
+#include "ipc/ipc_logging.h"
+#include "ipc/ipc_message_macros.h"
+
namespace IPC {
namespace internal {
@@ -69,7 +72,17 @@ bool ChannelReader::DispatchInputData(const char* input_data,
if (!WillDispatchInputMessage(&m))
return false;
- m.TraceMessageStep();
+#ifdef IPC_MESSAGE_LOG_ENABLED
+ Logging* logger = Logging::GetInstance();
+ std::string name;
+ logger->GetMessageText(m.type(), &name, &m, NULL);
+ TRACE_EVENT1("ipc", "ChannelReader::DispatchInputData", "name", name);
+#else
+ TRACE_EVENT2("ipc", "ChannelReader::DispatchInputData",
+ "class", IPC_MESSAGE_ID_CLASS(m.type()),
+ "line", IPC_MESSAGE_ID_LINE(m.type()));
+#endif
+ m.TraceMessageEnd();
if (IsHelloMessage(m))
HandleHelloMessage(m);
else