llvm/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cpp

//===-- sanitizer_stackdepot.cpp ------------------------------------------===//
//
// 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 shared between AddressSanitizer and ThreadSanitizer
// run-time libraries.
//===----------------------------------------------------------------------===//

#include "sanitizer_stackdepot.h"

#include "sanitizer_atomic.h"
#include "sanitizer_common.h"
#include "sanitizer_hash.h"
#include "sanitizer_mutex.h"
#include "sanitizer_stack_store.h"
#include "sanitizer_stackdepotbase.h"

namespace __sanitizer {

struct StackDepotNode {};

static StackStore stackStore;

// FIXME(dvyukov): this single reserved bit is used in TSan.
StackDepot;
static StackDepot theDepot;
// Keep mutable data out of frequently access nodes to improve caching
// efficiency.
static TwoLevelMap<atomic_uint32_t, StackDepot::kNodesSize1,
                   StackDepot::kNodesSize2>
    useCounts;

int StackDepotHandle::use_count() const {}

void StackDepotHandle::inc_use_count_unsafe() {}

uptr StackDepotNode::allocated() {}

static void CompressStackStore() {}

namespace {

class CompressThread {};

static CompressThread compress_thread;

void CompressThread::NewWorkNotify() {}

void CompressThread::Run() {}

void CompressThread::Stop() {}

void CompressThread::LockAndStop() {}

void CompressThread::Unlock() {}

}  // namespace

void StackDepotNode::store(u32 id, const args_type &args, hash_type hash) {}

StackDepotNode::args_type StackDepotNode::load(u32 id) const {}

StackDepotStats StackDepotGetStats() {}

u32 StackDepotPut(StackTrace stack) {}

StackDepotHandle StackDepotPut_WithHandle(StackTrace stack) {}

StackTrace StackDepotGet(u32 id) {}

void StackDepotLockBeforeFork() {}

void StackDepotUnlockAfterFork(bool fork_child) {}

void StackDepotPrintAll() {}

void StackDepotStopBackgroundThread() {}

StackDepotHandle StackDepotNode::get_handle(u32 id) {}

void StackDepotTestOnlyUnmap() {}

} // namespace __sanitizer