#include "src/trace_processor/sorter/trace_token_buffer.h"
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <functional>
#include <limits>
#include <optional>
#include <utility>
#include "perfetto/base/compiler.h"
#include "perfetto/base/logging.h"
#include "perfetto/trace_processor/ref_counted.h"
#include "perfetto/trace_processor/trace_blob.h"
#include "perfetto/trace_processor/trace_blob_view.h"
#include "src/trace_processor/importers/common/parser_types.h"
#include "src/trace_processor/importers/proto/packet_sequence_state_generation.h"
#include "src/trace_processor/util/bump_allocator.h"
namespace perfetto::trace_processor {
namespace {
struct alignas(8) TrackEventDataDescriptor { … };
static_assert …;
static_assert …;
template <typename T>
T ExtractFromPtr(uint8_t** ptr) { … }
template <typename T>
uint8_t* AppendToPtr(uint8_t* ptr, T value) { … }
uint32_t GetAllocSize(const TrackEventDataDescriptor& desc) { … }
}
TraceTokenBuffer::Id TraceTokenBuffer::Append(TrackEventData ted) { … }
template <>
TrackEventData TraceTokenBuffer::Extract<TrackEventData>(Id id) { … }
uint32_t TraceTokenBuffer::InternTraceBlob(InternedIndex interned_index,
const TraceBlobView& tbv) { … }
uint16_t TraceTokenBuffer::InternSeqState(
InternedIndex interned_index,
RefPtr<PacketSequenceStateGeneration> ptr) { … }
uint32_t TraceTokenBuffer::AddTraceBlob(InternedIndex interned_index,
const TraceBlobView& tbv) { … }
void TraceTokenBuffer::FreeMemory() { … }
BumpAllocator::AllocId TraceTokenBuffer::AllocAndResizeInternedVectors(
uint32_t size) { … }
TraceTokenBuffer::InternedIndex TraceTokenBuffer::GetInternedIndex(
BumpAllocator::AllocId alloc_id) { … }
}