#include "base/trace_event/heap_profiler_allocation_context_tracker.h"
#include <ostream>
#include "base/atomicops.h"
#include "base/check_op.h"
#include "base/no_destructor.h"
#include "base/notreached.h"
#include "base/threading/thread_local_storage.h"
namespace base {
namespace trace_event {
std::atomic<AllocationContextTracker::CaptureMode>
AllocationContextTracker::capture_mode_{ … };
namespace {
const size_t kMaxTaskDepth = …;
AllocationContextTracker* const kInitializingSentinel = …;
void DestructAllocationContextTracker(void* alloc_ctx_tracker) { … }
ThreadLocalStorage::Slot& AllocationContextTrackerTLS() { … }
}
AllocationContextTracker*
AllocationContextTracker::GetInstanceForCurrentThread() { … }
AllocationContextTracker::AllocationContextTracker() { … }
AllocationContextTracker::~AllocationContextTracker() = default;
void AllocationContextTracker::SetCurrentThreadName(const char* name) { … }
void AllocationContextTracker::SetCaptureMode(CaptureMode mode) { … }
void AllocationContextTracker::PushCurrentTaskContext(const char* context) { … }
void AllocationContextTracker::PopCurrentTaskContext(const char* context) { … }
}
}