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

Side by Side Diff: content/common/child_thread.cc

Issue 9181002: Track parent-child relations during profiling (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 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 | « content/common/child_thread.h ('k') | content/public/browser/profiler_controller.h » ('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) 2011 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 #include "content/common/child_thread.h" 5 #include "content/common/child_thread.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/process.h" 9 #include "base/process.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 #if defined(IPC_MESSAGE_LOG_ENABLED) 212 #if defined(IPC_MESSAGE_LOG_ENABLED)
213 void ChildThread::OnSetIPCLoggingEnabled(bool enable) { 213 void ChildThread::OnSetIPCLoggingEnabled(bool enable) {
214 if (enable) 214 if (enable)
215 IPC::Logging::GetInstance()->Enable(); 215 IPC::Logging::GetInstance()->Enable();
216 else 216 else
217 IPC::Logging::GetInstance()->Disable(); 217 IPC::Logging::GetInstance()->Disable();
218 } 218 }
219 #endif // IPC_MESSAGE_LOG_ENABLED 219 #endif // IPC_MESSAGE_LOG_ENABLED
220 220
221 void ChildThread::OnSetProfilerStatus(bool enable) { 221 void ChildThread::OnSetProfilerStatus(
222 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enable); 222 tracked_objects::ThreadData::Status status) {
223 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(status);
223 } 224 }
224 225
225 void ChildThread::OnGetChildProfilerData( 226 void ChildThread::OnGetChildProfilerData(
226 int sequence_number, 227 int sequence_number,
227 const std::string& process_type) { 228 const std::string& process_type) {
228 scoped_ptr<base::DictionaryValue> value( 229 scoped_ptr<base::DictionaryValue> value(
229 tracked_objects::ThreadData::ToValue(false)); 230 tracked_objects::ThreadData::ToValue(false));
230 value->SetString("process_type", process_type); 231 value->SetString("process_type", process_type);
231 value->SetInteger("process_id", base::GetCurrentProcId()); 232 value->SetInteger("process_id", base::GetCurrentProcId());
232 233
(...skipping 26 matching lines...) Expand all
259 } 260 }
260 261
261 // The child process shutdown sequence is a request response based mechanism, 262 // The child process shutdown sequence is a request response based mechanism,
262 // where we send out an initial feeler request to the child process host 263 // where we send out an initial feeler request to the child process host
263 // instance in the browser to verify if it's ok to shutdown the child process. 264 // instance in the browser to verify if it's ok to shutdown the child process.
264 // The browser then sends back a response if it's ok to shutdown. This avoids 265 // The browser then sends back a response if it's ok to shutdown. This avoids
265 // race conditions if the process refcount is 0 but there's an IPC message 266 // race conditions if the process refcount is 0 but there's an IPC message
266 // inflight that would addref it. 267 // inflight that would addref it.
267 Send(new ChildProcessHostMsg_ShutdownRequest); 268 Send(new ChildProcessHostMsg_ShutdownRequest);
268 } 269 }
OLDNEW
« no previous file with comments | « content/common/child_thread.h ('k') | content/public/browser/profiler_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698