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

Side by Side Diff: content/common/child_process_messages.h

Issue 8588023: Collect profiler stats from browser child processes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Common IPC messages used for child processes. 5 // Common IPC messages used for child processes.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include "base/process.h"
8 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
9 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
10 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
11 #include "ipc/ipc_message_macros.h" 12 #include "ipc/ipc_message_macros.h"
12 13
13 #undef IPC_MESSAGE_EXPORT 14 #undef IPC_MESSAGE_EXPORT
14 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 15 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
15 16
16 #define IPC_MESSAGE_START ChildProcessMsgStart 17 #define IPC_MESSAGE_START ChildProcessMsgStart
17 18
(...skipping 16 matching lines...) Expand all
34 IPC_MESSAGE_CONTROL2(ChildProcessMsg_BeginTracing, 35 IPC_MESSAGE_CONTROL2(ChildProcessMsg_BeginTracing,
35 std::vector<std::string> /* included_categories */, 36 std::vector<std::string> /* included_categories */,
36 std::vector<std::string> /* excluded_categories */) 37 std::vector<std::string> /* excluded_categories */)
37 38
38 // Sent to all child processes to disable trace event recording. 39 // Sent to all child processes to disable trace event recording.
39 IPC_MESSAGE_CONTROL0(ChildProcessMsg_EndTracing) 40 IPC_MESSAGE_CONTROL0(ChildProcessMsg_EndTracing)
40 41
41 // Sent to all child processes to get trace buffer fullness. 42 // Sent to all child processes to get trace buffer fullness.
42 IPC_MESSAGE_CONTROL0(ChildProcessMsg_GetTraceBufferPercentFull) 43 IPC_MESSAGE_CONTROL0(ChildProcessMsg_GetTraceBufferPercentFull)
43 44
45 // Tell the child process to enable or disable the profiler status.
46 IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetProfilerStatus,
47 bool /* profiler status */)
48
49 // Sent to all the child processes to send back profiler data (ThreadData in
50 // tracked_objects).
51 IPC_MESSAGE_CONTROL2(ChildProcessMsg_GetChildProfilerData,
52 int, /* sequence number. */
53 std::string /* pickled Value of process type. */)
54
44 // Sent to child processes to dump their handle table. 55 // Sent to child processes to dump their handle table.
45 IPC_MESSAGE_CONTROL0(ChildProcessMsg_DumpHandles) 56 IPC_MESSAGE_CONTROL0(ChildProcessMsg_DumpHandles)
46 57
47 //////////////////////////////////////////////////////////////////////////////// 58 ////////////////////////////////////////////////////////////////////////////////
48 // Messages sent from the child process to the browser. 59 // Messages sent from the child process to the browser.
49 60
50 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ShutdownRequest) 61 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ShutdownRequest)
51 62
52 // Notify the browser that this child process supports tracing. 63 // Notify the browser that this child process supports tracing.
53 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ChildSupportsTracing) 64 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ChildSupportsTracing)
54 65
55 // Reply from child processes acking ChildProcessMsg_TraceChangeStatus(false). 66 // Reply from child processes acking ChildProcessMsg_TraceChangeStatus(false).
56 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_EndTracingAck, 67 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_EndTracingAck,
57 std::vector<std::string> /* known_categories */) 68 std::vector<std::string> /* known_categories */)
58 69
59 // Sent if the trace buffer becomes full. 70 // Sent if the trace buffer becomes full.
60 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_TraceBufferFull) 71 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_TraceBufferFull)
61 72
62 // Child processes send trace data back in JSON chunks. 73 // Child processes send trace data back in JSON chunks.
63 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TraceDataCollected, 74 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TraceDataCollected,
64 std::string /*json trace data*/) 75 std::string /*json trace data*/)
65 76
66 // Reply to ChildProcessMsg_GetTraceBufferPercentFull. 77 // Reply to ChildProcessMsg_GetTraceBufferPercentFull.
67 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TraceBufferPercentFullReply, 78 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TraceBufferPercentFullReply,
68 float /*trace buffer percent full*/) 79 float /*trace buffer percent full*/)
69 80
81 // Send back profiler data (ThreadData in tracked_objects) as a pickled string.
82 IPC_MESSAGE_CONTROL2(ChildProcessHostMsg_ChildProfilerData,
83 int, /* sequence number. */
84 std::string /* pickled Value containing profiler data. */)
jam 2011/11/19 23:36:25 just send the DictionaryValue directly here, and l
ramant (doing other things) 2011/11/25 23:59:48 Done.
85
86 // Check if profiler is enabled in browser process or not. Browser process
87 // responds by sending ChildProcessMsg_SetProfilerStatus message to the child
88 // process (as specified by the child process id).
89 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_IsProfilerEnabled,
90 base::ProcessId /* child process id (pid) */ )
91
70 // Reply to ChildProcessMsg_DumpHandles when handle table dump is complete. 92 // Reply to ChildProcessMsg_DumpHandles when handle table dump is complete.
71 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_DumpHandlesDone) 93 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_DumpHandlesDone)
72 94
73 #if defined(OS_WIN) 95 #if defined(OS_WIN)
74 // Request that the given font be loaded by the host so it's cached by the 96 // Request that the given font be loaded by the host so it's cached by the
75 // OS. Please see ChildProcessHost::PreCacheFont for details. 97 // OS. Please see ChildProcessHost::PreCacheFont for details.
76 IPC_SYNC_MESSAGE_CONTROL1_0(ChildProcessHostMsg_PreCacheFont, 98 IPC_SYNC_MESSAGE_CONTROL1_0(ChildProcessHostMsg_PreCacheFont,
77 LOGFONT /* font data */) 99 LOGFONT /* font data */)
78 100
79 // Release the cached font 101 // Release the cached font
80 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ReleaseCachedFonts) 102 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ReleaseCachedFonts)
81 #endif // defined(OS_WIN) 103 #endif // defined(OS_WIN)
82 104
83 // Asks the browser to create a block of shared memory for the child process to 105 // Asks the browser to create a block of shared memory for the child process to
84 // fill in and pass back to the browser. 106 // fill in and pass back to the browser.
85 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_SyncAllocateSharedMemory, 107 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_SyncAllocateSharedMemory,
86 uint32 /* buffer size */, 108 uint32 /* buffer size */,
87 base::SharedMemoryHandle) 109 base::SharedMemoryHandle)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698