Index: ipc/ipc_message.h |
diff --git a/ipc/ipc_message.h b/ipc/ipc_message.h |
index 4603f0953748203e37edb0a964da4621df453cc3..1a2a45cb637ccb9c4d7c14c55666c1e46b1280df 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; |