chromium/services/tracing/public/cpp/trace_startup.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "services/tracing/public/cpp/trace_startup.h"

#include "base/check.h"
#include "base/command_line.h"
#include "base/memory/shared_memory_switch.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_log.h"
#include "build/build_config.h"
#include "components/tracing/common/etw_export_win.h"
#include "components/tracing/common/trace_to_console.h"
#include "components/tracing/common/tracing_switches.h"
#include "services/tracing/public/cpp/perfetto/perfetto_config.h"
#include "services/tracing/public/cpp/perfetto/producer_client.h"
#include "services/tracing/public/cpp/perfetto/system_producer.h"
#include "services/tracing/public/cpp/perfetto/trace_event_data_source.h"
#include "services/tracing/public/cpp/perfetto/traced_value_proto_writer.h"
#include "services/tracing/public/cpp/trace_event_agent.h"
#include "services/tracing/public/cpp/trace_event_args_allowlist.h"
#include "services/tracing/public/cpp/trace_startup_config.h"
#include "services/tracing/public/cpp/tracing_features.h"
#include "third_party/perfetto/include/perfetto/tracing/track.h"

#if BUILDFLAG(IS_APPLE)
#include "base/mac/mach_port_rendezvous.h"
#endif

namespace tracing {
namespace {

#if BUILDFLAG(IS_APPLE)
constexpr base::MachPortsForRendezvous::key_type kTraceConfigRendezvousKey =
    'trcc';
#endif

constexpr uint32_t kStartupTracingTimeoutMs =;  // 30 sec

TraceConfig;
TraceLog;

}  // namespace

bool g_tracing_initialized_after_threadpool_and_featurelist =;

bool IsTracingInitialized() {}

void EnableStartupTracingIfNeeded() {}

bool EnableStartupTracingForProcess(
    const perfetto::TraceConfig& perfetto_config) {}

void InitTracingPostThreadPoolStartAndFeatureList(bool enable_consumer) {}

base::ReadOnlySharedMemoryRegion CreateTracingConfigSharedMemory() {}

void COMPONENT_EXPORT(TRACING_CPP) AddTraceConfigToLaunchParameters(
    base::ReadOnlySharedMemoryRegion read_only_memory_region,
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE)
    base::GlobalDescriptors::Key descriptor_key,
    base::ScopedFD& out_descriptor_to_share,
#endif
    base::CommandLine* command_line,
    base::LaunchOptions* launch_options) {}

}  // namespace tracing