summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-05 00:39:27 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-05 00:39:27 +0000
commitc0d95e50bd35007e532f3d1cdb0b3892e7dc5314 (patch)
treeb7bae2fc3bb48b64b3c89941e8a437c17e061db5 /ipc
parent1cd758c5ac4fe21c61d3afc47f0648d1ad3c28b0 (diff)
downloadchromium_src-c0d95e50bd35007e532f3d1cdb0b3892e7dc5314.zip
chromium_src-c0d95e50bd35007e532f3d1cdb0b3892e7dc5314.tar.gz
chromium_src-c0d95e50bd35007e532f3d1cdb0b3892e7dc5314.tar.bz2
Support tracking of IPC messages as tasks in profiler
Also started to do more cleanup, including creating a base/profiler directory, and moving parts of the over-sized tracked_objects.* into that directory. r=rtenneti Review URL: http://codereview.chromium.org/8480014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108752 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_message_macros.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h
index 9b3f732..3c7f50f 100644
--- a/ipc/ipc_message_macros.h
+++ b/ipc/ipc_message_macros.h
@@ -20,7 +20,7 @@
//
// The XXXMsgStart value is an enumeration that ensures uniqueness for
// each different message file. Later, you will use this inside your
-// XXX_messages.h file before invoking message declatation macros:
+// XXX_messages.h file before invoking message declaration macros:
// #define IPC_MESSAGE_START XXXMsgStart
// ( ... your macro invocations go here ... )
//
@@ -176,6 +176,7 @@
#ifndef IPC_IPC_MESSAGE_MACROS_H_
#define IPC_IPC_MESSAGE_MACROS_H_
+#include "base/profiler/scoped_profile.h"
#include "ipc/ipc_message_utils.h"
#include "ipc/param_traits_macros.h"
@@ -940,20 +941,24 @@ LogFunctionMap g_log_function_mapping;
bool msg_is_ok__ = true; \
switch (ipc_message__.type()) { \
-#define IPC_MESSAGE_FORWARD(msg_class, obj, member_func) \
- case msg_class::ID: \
- msg_is_ok__ = msg_class::Dispatch(&ipc_message__, obj, this, \
- &member_func); \
- break;
+#define IPC_MESSAGE_FORWARD(msg_class, obj, member_func) \
+ case msg_class::ID: { \
+ TRACK_RUN_IN_IPC_HANDLER(member_func); \
+ msg_is_ok__ = msg_class::Dispatch(&ipc_message__, obj, this, \
+ &member_func); \
+ } \
+ break;
#define IPC_MESSAGE_HANDLER(msg_class, member_func) \
IPC_MESSAGE_FORWARD(msg_class, this, _IpcMessageHandlerClass::member_func)
-#define IPC_MESSAGE_FORWARD_DELAY_REPLY(msg_class, obj, member_func) \
- case msg_class::ID: \
- msg_is_ok__ = msg_class::DispatchDelayReply(&ipc_message__, obj, \
- &member_func); \
- break;
+#define IPC_MESSAGE_FORWARD_DELAY_REPLY(msg_class, obj, member_func) \
+ case msg_class::ID: { \
+ TRACK_RUN_IN_IPC_HANDLER(member_func); \
+ msg_is_ok__ = msg_class::DispatchDelayReply(&ipc_message__, obj, \
+ &member_func); \
+ } \
+ break;
#define IPC_MESSAGE_HANDLER_DELAY_REPLY(msg_class, member_func) \
IPC_MESSAGE_FORWARD_DELAY_REPLY(msg_class, this, \
@@ -964,9 +969,11 @@ LogFunctionMap g_log_function_mapping;
code; \
break;
-#define IPC_REPLY_HANDLER(func) \
- case IPC_REPLY_ID: \
- func(ipc_message__); \
+#define IPC_REPLY_HANDLER(func) \
+ case IPC_REPLY_ID: { \
+ TRACK_RUN_IN_IPC_HANDLER(func); \
+ func(ipc_message__); \
+ } \
break;