chromium/services/tracing/public/cpp/perfetto/track_name_recorder.cc

// Copyright 2022 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/perfetto/track_name_recorder.h"

#include "base/debug/crash_logging.h"
#include "base/no_destructor.h"
#include "base/process/current_process.h"
#include "base/rand_util.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "services/tracing/public/cpp/perfetto/trace_string_lookup.h"
#include "third_party/perfetto/include/perfetto/tracing/internal/track_event_internal.h"
#include "third_party/perfetto/protos/perfetto/trace/track_event/chrome_process_descriptor.gen.h"
#include "third_party/perfetto/protos/perfetto/trace/track_event/chrome_thread_descriptor.gen.h"
#include "third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.gen.h"
#include "third_party/perfetto/protos/perfetto/trace/track_event/thread_descriptor.gen.h"

#if BUILDFLAG(IS_ANDROID)
#include "base/android/build_info.h"
#endif

namespace tracing {

// Set the track descriptor for the current process.
void SetProcessTrackDescriptor(int64_t process_start_timestamp) {}

namespace {

void FillThreadTrack(const perfetto::ThreadTrack& track, const char* name) {}

// Set track descriptors for all threads that exist in the current process
// at this moment. OnThreadNameChanged can be called concurrently with this
// method, but this is not a problem because the Perfetto code is guarded
// by a lock and the value of the thread descriptor is the same.
// Should be called on the main thread.
void SetThreadTrackDescriptors() {}
}  // namespace

std::optional<uint64_t> GetTraceCrashId() {}

TrackNameRecorder::TrackNameRecorder()
    :{}

TrackNameRecorder::~TrackNameRecorder() = default;

// static
TrackNameRecorder* TrackNameRecorder::GetInstance() {}

void TrackNameRecorder::OnSetup(const perfetto::DataSourceBase::SetupArgs&) {}

void TrackNameRecorder::OnStop(const perfetto::DataSourceBase::StopArgs&) {}

void TrackNameRecorder::OnThreadNameChanged(const char* name) {}
}  // namespace tracing