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

Side by Side Diff: content/gpu/gpu_main.cc

Issue 17451017: Process names, and predictable thread and process ordering in about:tracing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
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 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 deferred_messages.Get().push(new GpuHostMsg_OnLogMessage( 77 deferred_messages.Get().push(new GpuHostMsg_OnLogMessage(
78 severity, header, message)); 78 severity, header, message));
79 return false; 79 return false;
80 } 80 }
81 81
82 } // namespace anonymous 82 } // namespace anonymous
83 83
84 // Main function for starting the Gpu process. 84 // Main function for starting the Gpu process.
85 int GpuMain(const MainFunctionParams& parameters) { 85 int GpuMain(const MainFunctionParams& parameters) {
86 TRACE_EVENT0("gpu", "GpuMain"); 86 TRACE_EVENT0("gpu", "GpuMain");
87 base::debug::TraceLog::GetInstance()->SetProcessLabel(0, "GPU Process");
88 base::debug::TraceLog::GetInstance()->SetProcessSortIndex(3);
dsinclair 2013/06/20 15:01:47 Would it be useful to move some of these magic num
87 89
88 const CommandLine& command_line = parameters.command_line; 90 const CommandLine& command_line = parameters.command_line;
89 if (command_line.HasSwitch(switches::kGpuStartupDialog)) { 91 if (command_line.HasSwitch(switches::kGpuStartupDialog)) {
90 ChildProcess::WaitForDebugger("Gpu"); 92 ChildProcess::WaitForDebugger("Gpu");
91 } 93 }
92 94
93 base::Time start_time = base::Time::Now(); 95 base::Time start_time = base::Time::Now();
94 96
95 bool in_browser_process = command_line.HasSwitch(switches::kSingleProcess) || 97 bool in_browser_process = command_line.HasSwitch(switches::kSingleProcess) ||
96 command_line.HasSwitch(switches::kInProcessGPU); 98 command_line.HasSwitch(switches::kInProcessGPU);
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 return true; 428 return true;
427 } 429 }
428 430
429 return false; 431 return false;
430 } 432 }
431 #endif // defined(OS_WIN) 433 #endif // defined(OS_WIN)
432 434
433 } // namespace. 435 } // namespace.
434 436
435 } // namespace content 437 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698