llvm/compiler-rt/lib/xray/xray_buffer_queue.cpp

//===-- xray_buffer_queue.cpp ----------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file is a part of XRay, a dynamic runtime instrumentation system.
//
// Defines the interface for a buffer queue implementation.
//
//===----------------------------------------------------------------------===//
#include "xray_buffer_queue.h"
#include "sanitizer_common/sanitizer_atomic.h"
#include "sanitizer_common/sanitizer_common.h"
#include "sanitizer_common/sanitizer_libc.h"
#if !SANITIZER_FUCHSIA
#include "sanitizer_common/sanitizer_posix.h"
#endif
#include "xray_allocator.h"
#include "xray_defs.h"
#include <memory>
#include <sys/mman.h>

usingnamespace__xray;

namespace {

BufferQueue::ControlBlock *allocControlBlock(size_t Size, size_t Count) {}

void deallocControlBlock(BufferQueue::ControlBlock *C, size_t Size,
                         size_t Count) {}

void decRefCount(BufferQueue::ControlBlock *C, size_t Size, size_t Count) {}

void incRefCount(BufferQueue::ControlBlock *C) {}

// We use a struct to ensure that we are allocating one atomic_uint64_t per
// cache line. This allows us to not worry about false-sharing among atomic
// objects being updated (constantly) by different threads.
struct ExtentsPadded {};

constexpr size_t kExtentsSize =;

} // namespace

BufferQueue::ErrorCode BufferQueue::init(size_t BS, size_t BC) {}

BufferQueue::BufferQueue(size_t B, size_t N,
                         bool &Success) XRAY_NEVER_INSTRUMENT
    :{}

BufferQueue::ErrorCode BufferQueue::getBuffer(Buffer &Buf) {}

BufferQueue::ErrorCode BufferQueue::releaseBuffer(Buffer &Buf) {}

BufferQueue::ErrorCode BufferQueue::finalize() {}

void BufferQueue::cleanupBuffers() {}

BufferQueue::~BufferQueue() {}