diff options
author | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-04 23:08:09 +0000 |
---|---|---|
committer | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-04 23:08:09 +0000 |
commit | 2a2e3d67d14de8e39d97273b57b1a079f25f83fd (patch) | |
tree | f48671ba4129e290a70484421e4dce96823dbdf1 /ipc/ipc_message.h | |
parent | fa2f1155fc8ba28621ca6a1ace002e30543f67e8 (diff) | |
download | chromium_src-2a2e3d67d14de8e39d97273b57b1a079f25f83fd.zip chromium_src-2a2e3d67d14de8e39d97273b57b1a079f25f83fd.tar.gz chromium_src-2a2e3d67d14de8e39d97273b57b1a079f25f83fd.tar.bz2 |
Add async trace events to trace progress of IPC messages
BUG=79942
Review URL: https://chromiumcodereview.appspot.com/10919023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154840 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_message.h')
-rw-r--r-- | ipc/ipc_message.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/ipc/ipc_message.h b/ipc/ipc_message.h index 4603f09..1a2a45c 100644 --- a/ipc/ipc_message.h +++ b/ipc/ipc_message.h @@ -8,6 +8,7 @@ #include <string> #include "base/basictypes.h" +#include "base/debug/trace_event.h" #include "base/pickle.h" #include "ipc/ipc_export.h" @@ -49,14 +50,16 @@ class IPC_EXPORT Message : public Pickle { }; // Bit values used in the flags field. + // Upper 24 bits of flags store a reference number, so this enum is limited to + // 8 bits. enum { - PRIORITY_MASK = 0x0003, // Low 2 bits of store the priority value. - SYNC_BIT = 0x0004, - REPLY_BIT = 0x0008, - REPLY_ERROR_BIT = 0x0010, - UNBLOCK_BIT = 0x0020, - PUMPING_MSGS_BIT = 0x0040, - HAS_SENT_TIME_BIT = 0x0080, + PRIORITY_MASK = 0x03, // Low 2 bits of store the priority value. + SYNC_BIT = 0x04, + REPLY_BIT = 0x08, + REPLY_ERROR_BIT = 0x10, + UNBLOCK_BIT = 0x20, + PUMPING_MSGS_BIT = 0x40, + HAS_SENT_TIME_BIT = 0x80, }; virtual ~Message(); @@ -221,6 +224,11 @@ class IPC_EXPORT Message : public Pickle { bool dont_log() const { return dont_log_; } #endif + // Called at various points between send and receive to track message. + void TraceMessageStep() { + TRACE_EVENT_ASYNC_BEGIN_STEP0("ipc", "IPC", header()->flags, NULL); + } + protected: friend class Channel; friend class MessageReplyDeserializer; |