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

Unified Diff: content/child/child_thread_impl.cc

Issue 985773002: Introducing phased profiling framework (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@write_to_file
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/child/child_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 4804194de3c6660b5a0bdefda4dcf6a110281045..7bf56562c90d476948b62db6cb710e4be2ea83f4 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -527,6 +527,8 @@ bool ChildThreadImpl::OnMessageReceived(const IPC::Message& msg) {
OnSetProfilerStatus)
IPC_MESSAGE_HANDLER(ChildProcessMsg_GetChildProfilerData,
OnGetChildProfilerData)
+ IPC_MESSAGE_HANDLER(ChildProcessMsg_OnProfilingPhase,
+ OnProfilingPhaseCompletion)
IPC_MESSAGE_HANDLER(ChildProcessMsg_DumpHandles, OnDumpHandles)
IPC_MESSAGE_HANDLER(ChildProcessMsg_SetProcessBackgrounded,
OnProcessBackgrounded)
@@ -566,12 +568,18 @@ void ChildThreadImpl::OnSetProfilerStatus(ThreadData::Status status) {
ThreadData::InitializeAndSetTrackingStatus(status);
}
-void ChildThreadImpl::OnGetChildProfilerData(int sequence_number) {
- tracked_objects::ProcessDataSnapshot process_data;
- ThreadData::Snapshot(&process_data);
+void ChildThreadImpl::OnGetChildProfilerData(int sequence_number,
+ int current_profiling_phase) {
+ tracked_objects::ProcessDataSnapshot process_data_snapshot;
+ ThreadData::GetProcessDataSnapshot(current_profiling_phase,
+ &process_data_snapshot);
Send(new ChildProcessHostMsg_ChildProfilerData(sequence_number,
- process_data));
+ process_data_snapshot));
+}
+
+void ChildThreadImpl::OnProfilingPhaseCompletion(int profiling_phase) {
+ ThreadData::OnProfilingPhaseCompletion(profiling_phase);
}
void ChildThreadImpl::OnDumpHandles() {

Powered by Google App Engine
This is Rietveld 408576698