chromium/third_party/perfetto/src/protozero/proto_ring_buffer.cc

/*
 * Copyright (C) 2021 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/ext/protozero/proto_ring_buffer.h"

#include "perfetto/base/logging.h"
#include "perfetto/ext/base/paged_memory.h"
#include "perfetto/protozero/proto_utils.h"

namespace protozero {

namespace {
constexpr size_t kGrowBytes =;

inline ProtoRingBuffer::Message FramingError() {}

// Tries to decode a length-delimited proto field from |start|.
// Returns a valid boundary if the preamble is valid and the length is within
// |end|, or an invalid message otherwise.
ProtoRingBuffer::Message TryReadProtoMessage(const uint8_t* start,
                                             const uint8_t* end) {}

}  // namespace

RingBufferMessageReader::RingBufferMessageReader()
    :{}
RingBufferMessageReader::~RingBufferMessageReader() = default;

void RingBufferMessageReader::Append(const void* data_void, size_t data_len) {}

RingBufferMessageReader::Message RingBufferMessageReader::ReadMessage() {}

ProtoRingBuffer::ProtoRingBuffer() = default;
ProtoRingBuffer::~ProtoRingBuffer() = default;

ProtoRingBuffer::Message ProtoRingBuffer::TryReadMessage(const uint8_t* start,
                                                         const uint8_t* end) {}

}  // namespace protozero