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

Side by Side Diff: content/app/content_main_runner.cc

Issue 2227293002: Add RAIL tracing category to Chrome tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing PaintTiming markers Created 4 years, 4 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 | « cc/debug/benchmark_instrumentation.cc ('k') | content/browser/browser_main_loop.cc » ('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) 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 "content/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 base::win::RegisterInvalidParamHandler(); 460 base::win::RegisterInvalidParamHandler();
461 ui::win::CreateATLModuleIfNeeded(); 461 ui::win::CreateATLModuleIfNeeded();
462 462
463 sandbox_info_ = *params.sandbox_info; 463 sandbox_info_ = *params.sandbox_info;
464 #else // !OS_WIN 464 #else // !OS_WIN
465 465
466 #if defined(OS_ANDROID) 466 #if defined(OS_ANDROID)
467 // See note at the initialization of ExitManager, below; basically, 467 // See note at the initialization of ExitManager, below; basically,
468 // only Android builds have the ctor/dtor handlers set up to use 468 // only Android builds have the ctor/dtor handlers set up to use
469 // TRACE_EVENT right away. 469 // TRACE_EVENT right away.
470 TRACE_EVENT0("startup,benchmark", "ContentMainRunnerImpl::Initialize"); 470 TRACE_EVENT0("startup,benchmark,rail", "ContentMainRunnerImpl::Initialize");
471 #endif // OS_ANDROID 471 #endif // OS_ANDROID
472 472
473 base::GlobalDescriptors* g_fds = base::GlobalDescriptors::GetInstance(); 473 base::GlobalDescriptors* g_fds = base::GlobalDescriptors::GetInstance();
474 474
475 // On Android, 475 // On Android,
476 // - setlocale() is not supported. 476 // - setlocale() is not supported.
477 // - We do not override the signal handlers so that we can get 477 // - We do not override the signal handlers so that we can get
478 // stack trace when crashing. 478 // stack trace when crashing.
479 // - The ipc_fd is passed through the Java service. 479 // - The ipc_fd is passed through the Java service.
480 // Thus, these are all disabled. 480 // Thus, these are all disabled.
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 #if defined(OS_WIN) 617 #if defined(OS_WIN)
618 // Enable exporting of events to ETW if requested on the command line. 618 // Enable exporting of events to ETW if requested on the command line.
619 if (command_line.HasSwitch(switches::kTraceExportEventsToETW)) 619 if (command_line.HasSwitch(switches::kTraceExportEventsToETW))
620 base::trace_event::TraceEventETWExport::EnableETWExport(); 620 base::trace_event::TraceEventETWExport::EnableETWExport();
621 #endif // OS_WIN 621 #endif // OS_WIN
622 622
623 #if !defined(OS_ANDROID) 623 #if !defined(OS_ANDROID)
624 // Android tracing started at the beginning of the method. 624 // Android tracing started at the beginning of the method.
625 // Other OSes have to wait till we get here in order for all the memory 625 // Other OSes have to wait till we get here in order for all the memory
626 // management setup to be completed. 626 // management setup to be completed.
627 TRACE_EVENT0("startup,benchmark", "ContentMainRunnerImpl::Initialize"); 627 TRACE_EVENT0("startup,benchmark,rail", "ContentMainRunnerImpl::Initialize");
628 #endif // !OS_ANDROID 628 #endif // !OS_ANDROID
629 629
630 #if defined(OS_MACOSX) 630 #if defined(OS_MACOSX)
631 // We need to allocate the IO Ports before the Sandbox is initialized or 631 // We need to allocate the IO Ports before the Sandbox is initialized or
632 // the first instance of PowerMonitor is created. 632 // the first instance of PowerMonitor is created.
633 // It's important not to allocate the ports for processes which don't 633 // It's important not to allocate the ports for processes which don't
634 // register with the power monitor - see crbug.com/88867. 634 // register with the power monitor - see crbug.com/88867.
635 if (process_type.empty() || 635 if (process_type.empty() ||
636 (delegate_ && 636 (delegate_ &&
637 delegate_->ProcessRegistersWithSystemProcess(process_type))) { 637 delegate_->ProcessRegistersWithSystemProcess(process_type))) {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 841
842 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 842 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
843 }; 843 };
844 844
845 // static 845 // static
846 ContentMainRunner* ContentMainRunner::Create() { 846 ContentMainRunner* ContentMainRunner::Create() {
847 return new ContentMainRunnerImpl(); 847 return new ContentMainRunnerImpl();
848 } 848 }
849 849
850 } // namespace content 850 } // namespace content
OLDNEW
« no previous file with comments | « cc/debug/benchmark_instrumentation.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698