Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: ipc/ipc_message.h

Issue 10919023: Add async trace events to trace progress of IPC messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix SpellCheckProviderTest.MultiLineText Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc_channel_win.cc ('k') | ipc/ipc_message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « ipc/ipc_channel_win.cc ('k') | ipc/ipc_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698