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

Side by Side Diff: ipc/ipc_message.h

Issue 148173011: Make flow event traces disabled-by-default, and rename "ipc" and "task" categories to "toplevel" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace "ipc" and "task" categories with toplevel. Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ipc/ipc_channel_reader.cc ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IPC_IPC_MESSAGE_H_ 5 #ifndef IPC_IPC_MESSAGE_H_
6 #define IPC_IPC_MESSAGE_H_ 6 #define IPC_IPC_MESSAGE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // reply message, so that when it's sent and we have the output parameters 210 // reply message, so that when it's sent and we have the output parameters
211 // we can log it. As such, we set a flag on the sent message to not log it. 211 // we can log it. As such, we set a flag on the sent message to not log it.
212 void set_sync_log_data(LogData* data) const { log_data_ = data; } 212 void set_sync_log_data(LogData* data) const { log_data_ = data; }
213 LogData* sync_log_data() const { return log_data_; } 213 LogData* sync_log_data() const { return log_data_; }
214 void set_dont_log() const { dont_log_ = true; } 214 void set_dont_log() const { dont_log_ = true; }
215 bool dont_log() const { return dont_log_; } 215 bool dont_log() const { return dont_log_; }
216 #endif 216 #endif
217 217
218 // Called to trace when message is sent. 218 // Called to trace when message is sent.
219 void TraceMessageBegin() { 219 void TraceMessageBegin() {
220 TRACE_EVENT_FLOW_BEGIN0("ipc", "IPC", header()->flags); 220 TRACE_EVENT_FLOW_BEGIN0(TRACE_DISABLED_BY_DEFAULT("toplevel.flow"), "IPC",
221 header()->flags);
221 } 222 }
222 // Called to trace when message is received. 223 // Called to trace when message is received.
223 void TraceMessageEnd() { 224 void TraceMessageEnd() {
224 TRACE_EVENT_FLOW_END0("ipc", "IPC", header()->flags); 225 TRACE_EVENT_FLOW_END0(TRACE_DISABLED_BY_DEFAULT("toplevel.flow"), "IPC",
226 header()->flags);
225 } 227 }
226 228
227 protected: 229 protected:
228 friend class Channel; 230 friend class Channel;
229 friend class MessageReplyDeserializer; 231 friend class MessageReplyDeserializer;
230 friend class SyncMessage; 232 friend class SyncMessage;
231 233
232 #pragma pack(push, 4) 234 #pragma pack(push, 4)
233 struct Header : Pickle::Header { 235 struct Header : Pickle::Header {
234 int32 routing; // ID of the view that this message is destined for 236 int32 routing; // ID of the view that this message is destined for
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 MSG_ROUTING_NONE = -2, 286 MSG_ROUTING_NONE = -2,
285 287
286 // indicates a general message not sent to a particular tab. 288 // indicates a general message not sent to a particular tab.
287 MSG_ROUTING_CONTROL = kint32max, 289 MSG_ROUTING_CONTROL = kint32max,
288 }; 290 };
289 291
290 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies 292 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies
291 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging 293 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging
292 294
293 #endif // IPC_IPC_MESSAGE_H_ 295 #endif // IPC_IPC_MESSAGE_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_reader.cc ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698