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

Unified Diff: services/service_manager/standalone/context.cc

Issue 2852183002: Delete the tracing service (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/service_manager/standalone/context.h ('k') | services/service_manager/standalone/tracer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/service_manager/standalone/context.cc
diff --git a/services/service_manager/standalone/context.cc b/services/service_manager/standalone/context.cc
index 998603612d12e2829df1cc25099dc8f4295d2724..dc401e387f1d5dcfa59a0794133cb684e068cf17 100644
--- a/services/service_manager/standalone/context.cc
+++ b/services/service_manager/standalone/context.cc
@@ -26,19 +26,13 @@
#include "base/threading/sequenced_worker_pool.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
-#include "components/tracing/common/tracing_switches.h"
#include "services/catalog/catalog.h"
#include "services/service_manager/connect_params.h"
#include "services/service_manager/connect_util.h"
#include "services/service_manager/runner/common/switches.h"
#include "services/service_manager/runner/host/service_process_launcher.h"
#include "services/service_manager/service_manager.h"
-#include "services/service_manager/standalone/tracer.h"
#include "services/service_manager/switches.h"
-#include "services/tracing/public/cpp/provider.h"
-#include "services/tracing/public/cpp/switches.h"
-#include "services/tracing/public/interfaces/constants.mojom.h"
-#include "services/tracing/public/interfaces/tracing.mojom.h"
#if defined(OS_MACOSX)
#include "services/service_manager/public/cpp/standalone_service/mach_broker.h"
@@ -85,16 +79,6 @@ Context::Context(
std::unique_ptr<base::Value> catalog_contents)
: main_entry_time_(base::Time::Now()) {
TRACE_EVENT0("service_manager", "Context::Context");
- const base::CommandLine& command_line =
- *base::CommandLine::ForCurrentProcess();
-
- bool trace_startup = command_line.HasSwitch(::switches::kTraceStartup);
- if (trace_startup) {
- tracer_.Start(
- command_line.GetSwitchValueASCII(::switches::kTraceStartup),
- command_line.GetSwitchValueASCII(::switches::kTraceStartupDuration),
- "mojo_runner.trace");
- }
blocking_pool_ = new base::SequencedWorkerPool(
kThreadPoolMaxThreads, "blocking_pool", base::TaskPriority::USER_VISIBLE);
@@ -108,41 +92,6 @@ Context::Context(
service_manager_.reset(
new ServiceManager(std::move(service_process_launcher_factory),
catalog_->TakeService()));
-
- bool enable_stats_collection_bindings =
- command_line.HasSwitch(tracing::kEnableStatsCollectionBindings);
-
- if (enable_stats_collection_bindings ||
- command_line.HasSwitch(switches::kEnableTracing)) {
- Identity source_identity = CreateServiceManagerIdentity();
- Identity tracing_identity(tracing::mojom::kServiceName, mojom::kRootUserID);
- tracing::mojom::FactoryPtr factory;
- BindInterface(service_manager(), source_identity, tracing_identity,
- &factory);
- provider_.InitializeWithFactory(&factory);
-
- if (command_line.HasSwitch(tracing::kTraceStartup)) {
- tracing::mojom::CollectorPtr coordinator;
- BindInterface(service_manager(), source_identity, tracing_identity,
- &coordinator);
- tracer_.StartCollectingFromTracingService(std::move(coordinator));
- }
-
- // Record the service manager startup metrics used for performance testing.
- if (enable_stats_collection_bindings) {
- tracing::mojom::StartupPerformanceDataCollectorPtr collector;
- BindInterface(service_manager(), source_identity, tracing_identity,
- &collector);
-#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
- // CurrentProcessInfo::CreationTime is only defined on some platforms.
- const base::Time creation_time = base::CurrentProcessInfo::CreationTime();
- collector->SetServiceManagerProcessCreationTime(
- creation_time.ToInternalValue());
-#endif
- collector->SetServiceManagerMainEntryPointTime(
- main_entry_time_.ToInternalValue());
- }
- }
}
Context::~Context() { blocking_pool_->Shutdown(); }
« no previous file with comments | « services/service_manager/standalone/context.h ('k') | services/service_manager/standalone/tracer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698