#include "base/profiler/metadata_recorder.h"
#include <optional>
#include "base/metrics/histogram_macros.h"
namespace base {
const size_t MetadataRecorder::MAX_METADATA_COUNT;
MetadataRecorder::Item::Item(uint64_t name_hash,
std::optional<int64_t> key,
std::optional<PlatformThreadId> thread_id,
int64_t value)
: … { … }
MetadataRecorder::Item::Item() : … { … }
MetadataRecorder::Item::Item(const Item& other) = default;
MetadataRecorder::Item& MetadataRecorder::Item::Item::operator=(
const Item& other) = default;
MetadataRecorder::ItemInternal::ItemInternal() = default;
MetadataRecorder::ItemInternal::~ItemInternal() = default;
MetadataRecorder::MetadataRecorder() { … }
MetadataRecorder::~MetadataRecorder() = default;
void MetadataRecorder::Set(uint64_t name_hash,
std::optional<int64_t> key,
std::optional<PlatformThreadId> thread_id,
int64_t value) { … }
void MetadataRecorder::Remove(uint64_t name_hash,
std::optional<int64_t> key,
std::optional<PlatformThreadId> thread_id) { … }
MetadataRecorder::MetadataProvider::MetadataProvider(
MetadataRecorder* metadata_recorder,
PlatformThreadId thread_id)
: … { … }
MetadataRecorder::MetadataProvider::~MetadataProvider() = default;
size_t MetadataRecorder::MetadataProvider::GetItems(
ItemArray* const items) const { … }
size_t MetadataRecorder::GetItems(ItemArray* const items,
PlatformThreadId thread_id) const { … }
size_t MetadataRecorder::TryReclaimInactiveSlots(size_t item_slots_used) { … }
size_t MetadataRecorder::ReclaimInactiveSlots(size_t item_slots_used) { … }
}