diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-10 01:28:01 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-10 01:28:01 +0000 |
commit | ca5246e1ad4d34836d68207204d6598da87cfabb (patch) | |
tree | f98032738b01c397763f31c03fa700a5124ec33e /ipc | |
parent | 1e9fe06dea94cdce23077fff7bc3e6487577a96d (diff) | |
download | chromium_src-ca5246e1ad4d34836d68207204d6598da87cfabb.zip chromium_src-ca5246e1ad4d34836d68207204d6598da87cfabb.tar.gz chromium_src-ca5246e1ad4d34836d68207204d6598da87cfabb.tar.bz2 |
Support tracking of IPC messages as tasks in profiler
This was previously landed as 108752, but reverted in 109004
by Joi to try to stop flaky failures in ASAN bot when
running browser_tests..
The failures included:
IncognitoSplitMode
TwoExtensionsCrashBothAtOnce
TwoExtensionsOneByOne
AutoUpdate
CognitoNoFile
IncognitoNoFile
OnChangedNotificationsBetweenBackgroundPages
SplitModeIncognito
I'm now landing 1 hook at a time back into the build, to
see which one(s) tickle flakiness.
The other hooks are commented out, so that I can
try several alternatives and figure out what is
tickling the problem.
The restructuring of the code was already landed, and did
not *appear* to induce the failures. Hence it is likely
that one of the IPC hooks is the problem.
If I need to, I'll TBR various owners, since I've already gotten permission for this landing.
r=rtenneti
Review URL: http://codereview.chromium.org/8499039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109357 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_message_macros.h | 62 |
1 files changed, 36 insertions, 26 deletions
diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h index 9b3f732..4b35667 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,40 +941,49 @@ 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); */ /* TODO(jar) */ \ + 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, \ _IpcMessageHandlerClass::member_func) -#define IPC_MESSAGE_HANDLER_GENERIC(msg_class, code) \ - case msg_class::ID: \ - code; \ - break; - -#define IPC_REPLY_HANDLER(func) \ - case IPC_REPLY_ID: \ - func(ipc_message__); \ - break; - - -#define IPC_MESSAGE_UNHANDLED(code) \ - default: \ - code; \ - break; +#define IPC_MESSAGE_HANDLER_GENERIC(msg_class, code) \ + case msg_class::ID: { \ + code; \ + } \ + break; + +#define IPC_REPLY_HANDLER(func) \ + case IPC_REPLY_ID: { \ + /* TRACK_RUN_IN_IPC_HANDLER(func); */ /* TODO(jar) */ \ + func(ipc_message__); \ + } \ + break; + + +#define IPC_MESSAGE_UNHANDLED(code) \ + default: { \ + /* TRACK_RUN_IN_IPC_HANDLER(code); */ /* TODO(jar) */ \ + code; \ + } \ + break; #define IPC_MESSAGE_UNHANDLED_ERROR() \ IPC_MESSAGE_UNHANDLED(NOTREACHED() << \ |