chromium/third_party/perfetto/src/tracing/track.cc

/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "perfetto/tracing/track.h"

#include "perfetto/ext/base/file_utils.h"
#include "perfetto/ext/base/hash.h"
#include "perfetto/ext/base/scoped_file.h"
#include "perfetto/ext/base/string_splitter.h"
#include "perfetto/ext/base/string_utils.h"
#include "perfetto/ext/base/thread_utils.h"
#include "perfetto/ext/base/uuid.h"
#include "perfetto/tracing/internal/track_event_data_source.h"
#include "perfetto/tracing/internal/track_event_internal.h"
#include "protos/perfetto/trace/track_event/counter_descriptor.gen.h"
#include "protos/perfetto/trace/track_event/process_descriptor.gen.h"
#include "protos/perfetto/trace/track_event/process_descriptor.pbzero.h"
#include "protos/perfetto/trace/track_event/thread_descriptor.gen.h"
#include "protos/perfetto/trace/track_event/thread_descriptor.pbzero.h"

namespace perfetto {

// static
uint64_t Track::process_uuid;

protos::gen::TrackDescriptor Track::Serialize() const {}

void Track::Serialize(protos::pbzero::TrackDescriptor* desc) const {}

// static
Track Track::ThreadScoped(const void* ptr, Track parent) {}

protos::gen::TrackDescriptor ProcessTrack::Serialize() const {}

void ProcessTrack::Serialize(protos::pbzero::TrackDescriptor* desc) const {}

protos::gen::TrackDescriptor ThreadTrack::Serialize() const {}

// static
ThreadTrack ThreadTrack::Current() {}

// static
ThreadTrack ThreadTrack::ForThread(base::PlatformThreadId tid_) {}

void ThreadTrack::Serialize(protos::pbzero::TrackDescriptor* desc) const {}

protos::gen::TrackDescriptor CounterTrack::Serialize() const {}

void CounterTrack::Serialize(protos::pbzero::TrackDescriptor* desc) const {}

namespace internal {
namespace {

uint64_t GetProcessStartTime() {}

}  // namespace

// static
TrackRegistry* TrackRegistry::instance_;

TrackRegistry::TrackRegistry() = default;
TrackRegistry::~TrackRegistry() = default;

// static
void TrackRegistry::InitializeInstance() {}

// static
uint64_t TrackRegistry::ComputeProcessUuid() {}

void TrackRegistry::ResetForTesting() {}

void TrackRegistry::UpdateTrack(Track track,
                                const std::string& serialized_desc) {}

void TrackRegistry::EraseTrack(Track track) {}

// static
void TrackRegistry::WriteTrackDescriptor(
    const SerializedTrackDescriptor& desc,
    protozero::MessageHandle<protos::pbzero::TracePacket> packet) {}

}  // namespace internal
}  // namespace perfetto