llvm/compiler-rt/lib/memprof/memprof_thread.cpp

//===-- memprof_thread.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 a part of MemProfiler, a memory profiler.
//
// Thread-related code.
//===----------------------------------------------------------------------===//
#include "memprof_thread.h"
#include "memprof_allocator.h"
#include "memprof_interceptors.h"
#include "memprof_mapping.h"
#include "memprof_stack.h"
#include "sanitizer_common/sanitizer_common.h"
#include "sanitizer_common/sanitizer_placement_new.h"
#include "sanitizer_common/sanitizer_stackdepot.h"
#include "sanitizer_common/sanitizer_tls_get_addr.h"

namespace __memprof {

// MemprofThreadContext implementation.

void MemprofThreadContext::OnCreated(void *arg) {}

void MemprofThreadContext::OnFinished() {}

alignas(16) static char thread_registry_placeholder[sizeof(ThreadRegistry)];
static ThreadRegistry *memprof_thread_registry;

static Mutex mu_for_thread_context;
static LowLevelAllocator allocator_for_thread_context;

static ThreadContextBase *GetMemprofThreadContext(u32 tid) {}

ThreadRegistry &memprofThreadRegistry() {}

MemprofThreadContext *GetThreadContextByTidLocked(u32 tid) {}

// MemprofThread implementation.

MemprofThread *MemprofThread::Create(thread_callback_t start_routine, void *arg,
                                     u32 parent_tid, StackTrace *stack,
                                     bool detached) {}

void MemprofThread::TSDDtor(void *tsd) {}

void MemprofThread::Destroy() {}

inline MemprofThread::StackBounds MemprofThread::GetStackBounds() const {}

uptr MemprofThread::stack_top() {}

uptr MemprofThread::stack_bottom() {}

uptr MemprofThread::stack_size() {}

void MemprofThread::Init(const InitOptions *options) {}

thread_return_t
MemprofThread::ThreadStart(tid_t os_id,
                           atomic_uintptr_t *signal_thread_is_registered) {}

MemprofThread *CreateMainThread() {}

// This implementation doesn't use the argument, which is just passed down
// from the caller of Init (which see, above).  It's only there to support
// OS-specific implementations that need more information passed through.
void MemprofThread::SetThreadStackAndTls(const InitOptions *options) {}

bool MemprofThread::AddrIsInStack(uptr addr) {}

MemprofThread *GetCurrentThread() {}

void SetCurrentThread(MemprofThread *t) {}

u32 GetCurrentTidOrInvalid() {}

void EnsureMainThreadIDIsCorrect() {}
} // namespace __memprof