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

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

Issue 15418002: Record Chrome trace events in tcmalloc heap profiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments 2 Created 7 years, 5 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
11 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
12 #include "base/debug/trace_event_memory.h"
12 #include "base/lazy_instance.h" 13 #include "base/lazy_instance.h"
13 #include "base/message_loop.h" 14 #include "base/message_loop.h"
14 #include "base/rand_util.h" 15 #include "base/rand_util.h"
15 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
17 #include "base/threading/platform_thread.h" 18 #include "base/threading/platform_thread.h"
18 #include "build/build_config.h" 19 #include "build/build_config.h"
19 #include "content/child/child_process.h" 20 #include "content/child/child_process.h"
20 #include "content/common/gpu/gpu_config.h" 21 #include "content/common/gpu/gpu_config.h"
21 #include "content/common/gpu/gpu_messages.h" 22 #include "content/common/gpu/gpu_messages.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 gpu_info, 285 gpu_info,
285 deferred_messages.Get()); 286 deferred_messages.Get());
286 while (!deferred_messages.Get().empty()) 287 while (!deferred_messages.Get().empty())
287 deferred_messages.Get().pop(); 288 deferred_messages.Get().pop();
288 289
289 child_thread->Init(start_time); 290 child_thread->Init(start_time);
290 291
291 gpu_process.set_main_thread(child_thread); 292 gpu_process.set_main_thread(child_thread);
292 293
293 { 294 {
295 base::debug::TraceMemoryController trace_memory_controller(
296 main_message_loop.message_loop_proxy());
294 TRACE_EVENT0("gpu", "Run Message Loop"); 297 TRACE_EVENT0("gpu", "Run Message Loop");
295 main_message_loop.Run(); 298 main_message_loop.Run();
296 } 299 }
297 300
298 child_thread->StopWatchdog(); 301 child_thread->StopWatchdog();
299 302
300 return 0; 303 return 0;
301 } 304 }
302 305
303 namespace { 306 namespace {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 return true; 426 return true;
424 } 427 }
425 428
426 return false; 429 return false;
427 } 430 }
428 #endif // defined(OS_WIN) 431 #endif // defined(OS_WIN)
429 432
430 } // namespace. 433 } // namespace.
431 434
432 } // namespace content 435 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698