//===-- memprof_stack.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. // // Code for MemProf stack trace. //===----------------------------------------------------------------------===// #include "memprof_stack.h" #include "memprof_internal.h" #include "sanitizer_common/sanitizer_atomic.h" namespace __memprof { static atomic_uint32_t malloc_context_size; void SetMallocContextSize(u32 size) { … } u32 GetMallocContextSize() { … } } // namespace __memprof void __sanitizer::BufferedStackTrace::UnwindImpl(uptr pc, uptr bp, void *context, bool request_fast, u32 max_depth) { … } // ------------------ Interface -------------- {{{1 extern "C" { SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_print_stack_trace() { … } } // extern "C"