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

Side by Side Diff: content/renderer/renderer_main.cc

Issue 153063002: plumbing for skia trace events into Chrome's about://tracing framework (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | skia/ext/trace_event.h » ('j') | skia/ext/trace_event.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/base_switches.h" 5 #include "base/base_switches.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/debug/debugger.h" 7 #include "base/debug/debugger.h"
8 #include "base/debug/stack_trace.h" 8 #include "base/debug/stack_trace.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 12 matching lines...) Expand all
23 #include "content/child/child_process.h" 23 #include "content/child/child_process.h"
24 #include "content/common/content_constants_internal.h" 24 #include "content/common/content_constants_internal.h"
25 #include "content/public/common/content_switches.h" 25 #include "content/public/common/content_switches.h"
26 #include "content/public/common/main_function_params.h" 26 #include "content/public/common/main_function_params.h"
27 #include "content/public/renderer/content_renderer_client.h" 27 #include "content/public/renderer/content_renderer_client.h"
28 #include "content/renderer/browser_plugin/browser_plugin_manager_impl.h" 28 #include "content/renderer/browser_plugin/browser_plugin_manager_impl.h"
29 #include "content/renderer/pepper/pepper_plugin_registry.h" 29 #include "content/renderer/pepper/pepper_plugin_registry.h"
30 #include "content/renderer/render_process_impl.h" 30 #include "content/renderer/render_process_impl.h"
31 #include "content/renderer/render_thread_impl.h" 31 #include "content/renderer/render_thread_impl.h"
32 #include "content/renderer/renderer_main_platform_delegate.h" 32 #include "content/renderer/renderer_main_platform_delegate.h"
33 #include "skia/ext/trace_event.h"
33 #include "ui/base/ui_base_switches.h" 34 #include "ui/base/ui_base_switches.h"
34 #include "webkit/child/webkit_child_helpers.h" 35 #include "webkit/child/webkit_child_helpers.h"
35 36
36 #if defined(OS_ANDROID) 37 #if defined(OS_ANDROID)
37 #include "base/android/sys_utils.h" 38 #include "base/android/sys_utils.h"
38 #include "third_party/skia/include/core/SkGraphics.h" 39 #include "third_party/skia/include/core/SkGraphics.h"
39 #endif // OS_ANDROID 40 #endif // OS_ANDROID
40 41
41 #if defined(OS_MACOSX) 42 #if defined(OS_MACOSX)
42 #include <Carbon/Carbon.h> 43 #include <Carbon/Carbon.h>
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 231 }
231 #if defined(OS_POSIX) && !defined(OS_MACOSX) 232 #if defined(OS_POSIX) && !defined(OS_MACOSX)
232 RenderProcessImpl render_process; 233 RenderProcessImpl render_process;
233 new RenderThreadImpl(); 234 new RenderThreadImpl();
234 #endif 235 #endif
235 236
236 base::HighResolutionTimerManager hi_res_timer_manager; 237 base::HighResolutionTimerManager hi_res_timer_manager;
237 238
238 platform.RunSandboxTests(no_sandbox); 239 platform.RunSandboxTests(no_sandbox);
239 240
241 // Initialize the binding beteween Chrome's tracing events
242 // and Chrome's. Skia will take ownership of and clean up
243 // the memory allocated here.
244 SkEventTracer::SetInstance(new skia::SkChromiumEventTracer());
piman 2014/02/03 22:25:02 nit: should we do this in the RenderThreadImpl ini
nduca 2014/02/04 01:15:19 yea definitely reder thread impl
humper 2014/02/04 19:58:08 Sure, I'd be happy to move it -- this place was su
humper 2014/02/04 19:58:08 Done.
245
240 startup_timer.Stop(); // End of Startup Time Measurement. 246 startup_timer.Stop(); // End of Startup Time Measurement.
241 247
242 if (run_loop) { 248 if (run_loop) {
243 #if defined(OS_MACOSX) 249 #if defined(OS_MACOSX)
244 if (pool) 250 if (pool)
245 pool->Recycle(); 251 pool->Recycle();
246 #endif 252 #endif
247 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); 253 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0);
248 base::MessageLoop::current()->Run(); 254 base::MessageLoop::current()->Run();
249 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); 255 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0);
250 } 256 }
251 } 257 }
252 platform.PlatformUninitialize(); 258 platform.PlatformUninitialize();
253 TRACE_EVENT_END_ETW("RendererMain", 0, ""); 259 TRACE_EVENT_END_ETW("RendererMain", 0, "");
254 return 0; 260 return 0;
255 } 261 }
256 262
257 } // namespace content 263 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | skia/ext/trace_event.h » ('j') | skia/ext/trace_event.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698