#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "base/profiler/thread_delegate_posix.h"
#include <inttypes.h>
#include <pthread.h>
#include <stdio.h>
#include <optional>
#include "base/memory/ptr_util.h"
#include "base/process/process_handle.h"
#include "build/build_config.h"
#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
#include "base/profiler/stack_base_address_posix.h"
#endif
namespace base {
std::unique_ptr<ThreadDelegatePosix> ThreadDelegatePosix::Create(
SamplingProfilerThreadToken thread_token) { … }
ThreadDelegatePosix::~ThreadDelegatePosix() = default;
PlatformThreadId ThreadDelegatePosix::GetThreadId() const { … }
uintptr_t ThreadDelegatePosix::GetStackBaseAddress() const { … }
std::vector<uintptr_t*> ThreadDelegatePosix::GetRegistersToRewrite(
RegisterContext* thread_context) { … }
ThreadDelegatePosix::ThreadDelegatePosix(PlatformThreadId id,
uintptr_t base_address)
: … { … }
}