//===-- asan_memory_profile.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 AddressSanitizer, an address sanity checker. // // This file implements __sanitizer_print_memory_profile. //===----------------------------------------------------------------------===// #include "asan/asan_allocator.h" #include "lsan/lsan_common.h" #include "sanitizer_common/sanitizer_common.h" #include "sanitizer_common/sanitizer_stackdepot.h" #include "sanitizer_common/sanitizer_stacktrace.h" #if CAN_SANITIZE_LEAKS namespace __asan { struct AllocationSite { … }; class HeapProfile { … }; static void ChunkCallback(uptr chunk, void *arg) { … } static void MemoryProfileCB(uptr top_percent, uptr max_number_of_contexts) { … } } // namespace __asan #endif // CAN_SANITIZE_LEAKS extern "C" { SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_print_memory_profile(uptr top_percent, uptr max_number_of_contexts) { … } } // extern "C"