summaryrefslogtreecommitdiffstats
path: root/content/common/child_process_messages.h
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-13 00:39:26 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-13 00:39:26 +0000
commit1cb05dbbcafd3f35999606af6c8316058ce7b93a (patch)
treedfa6794b8a9c83a91d4c1bb487ab7551e3514fe3 /content/common/child_process_messages.h
parent543f27572597201d5fae77066c9146a6a87d41d8 (diff)
downloadchromium_src-1cb05dbbcafd3f35999606af6c8316058ce7b93a.zip
chromium_src-1cb05dbbcafd3f35999606af6c8316058ce7b93a.tar.gz
chromium_src-1cb05dbbcafd3f35999606af6c8316058ce7b93a.tar.bz2
[UMA] Use proper C++ objects to serialize tracked_objects across process boundaries.
See https://chromiumcodereview.appspot.com/9702014/ for the original code review. Uploading to a new issue due to an AppEngine error... BUG=103480 TEST=none (refactoring, no functional change expected) TBR=jam@chromium.org,jar@chromium.org,eroman@chromium.org,jhawkins@chromium.org,ajwong@chromium.org Review URL: http://codereview.chromium.org/10077001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/child_process_messages.h')
-rw-r--r--content/common/child_process_messages.h47
1 files changed, 42 insertions, 5 deletions
diff --git a/content/common/child_process_messages.h b/content/common/child_process_messages.h
index ab56be0..363c556 100644
--- a/content/common/child_process_messages.h
+++ b/content/common/child_process_messages.h
@@ -14,6 +14,44 @@
IPC_ENUM_TRAITS(tracked_objects::ThreadData::Status)
+IPC_STRUCT_TRAITS_BEGIN(tracked_objects::LocationSnapshot)
+ IPC_STRUCT_TRAITS_MEMBER(file_name)
+ IPC_STRUCT_TRAITS_MEMBER(function_name)
+ IPC_STRUCT_TRAITS_MEMBER(line_number)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(tracked_objects::BirthOnThreadSnapshot)
+ IPC_STRUCT_TRAITS_MEMBER(location)
+ IPC_STRUCT_TRAITS_MEMBER(thread_name)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(tracked_objects::DeathDataSnapshot)
+ IPC_STRUCT_TRAITS_MEMBER(count)
+ IPC_STRUCT_TRAITS_MEMBER(run_duration_sum)
+ IPC_STRUCT_TRAITS_MEMBER(run_duration_max)
+ IPC_STRUCT_TRAITS_MEMBER(run_duration_sample)
+ IPC_STRUCT_TRAITS_MEMBER(queue_duration_sum)
+ IPC_STRUCT_TRAITS_MEMBER(queue_duration_max)
+ IPC_STRUCT_TRAITS_MEMBER(queue_duration_sample)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(tracked_objects::TaskSnapshot)
+ IPC_STRUCT_TRAITS_MEMBER(birth)
+ IPC_STRUCT_TRAITS_MEMBER(death_data)
+ IPC_STRUCT_TRAITS_MEMBER(death_thread_name)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(tracked_objects::ParentChildPairSnapshot)
+ IPC_STRUCT_TRAITS_MEMBER(parent)
+ IPC_STRUCT_TRAITS_MEMBER(child)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(tracked_objects::ProcessDataSnapshot)
+ IPC_STRUCT_TRAITS_MEMBER(tasks)
+ IPC_STRUCT_TRAITS_MEMBER(descendants)
+ IPC_STRUCT_TRAITS_MEMBER(process_id)
+IPC_STRUCT_TRAITS_END()
+
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
@@ -48,9 +86,8 @@ IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetProfilerStatus,
// Send to all the child processes to send back profiler data (ThreadData in
// tracked_objects).
-IPC_MESSAGE_CONTROL2(ChildProcessMsg_GetChildProfilerData,
- int, /* sequence number. */
- std::string /* pickled Value of process type. */)
+IPC_MESSAGE_CONTROL1(ChildProcessMsg_GetChildProfilerData,
+ int /* sequence number */)
// Sent to child processes to dump their handle table.
IPC_MESSAGE_CONTROL0(ChildProcessMsg_DumpHandles)
@@ -80,8 +117,8 @@ IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TraceBufferPercentFullReply,
// Send back profiler data (ThreadData in tracked_objects).
IPC_MESSAGE_CONTROL2(ChildProcessHostMsg_ChildProfilerData,
- int, /* sequence number. */
- DictionaryValue /* profiler data. */)
+ int, /* sequence number */
+ tracked_objects::ProcessDataSnapshot /* profiler data */)
// Reply to ChildProcessMsg_DumpHandles when handle table dump is complete.
IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_DumpHandlesDone)