diff options
author | Kostya Serebryany <kcc@google.com> | 2016-06-02 01:21:52 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2016-06-02 01:21:52 +0000 |
commit | cb9881b4dd932b0d8e838f6e902ad6585ef57026 (patch) | |
tree | b6e75e2c0afe20a59c2972914f98b442f07d77a6 /include/sanitizer | |
parent | da1eadd571a9842beaf8dfea352ed2b7ea07bbbf (diff) |
[asan] add an interface function __sanitizer_print_memory_profile (a basic memory profiler; asan/Linux-only for now)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271463 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/sanitizer')
-rw-r--r-- | include/sanitizer/common_interface_defs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sanitizer/common_interface_defs.h b/include/sanitizer/common_interface_defs.h index 0cd6e9791..1bf3c1c96 100644 --- a/include/sanitizer/common_interface_defs.h +++ b/include/sanitizer/common_interface_defs.h @@ -133,6 +133,12 @@ extern "C" { const char *s2, size_t n, int result); void __sanitizer_weak_hook_strcmp(void *called_pc, const char *s1, const char *s2, int result); + + // Prints stack traces for all live heap allocations ordered by total + // allocation size until `top_percent` of total live heap is shown. + // `top_percent` should be between 1 and 100. + // Experimental feature currently available only with asan on Linux. + void __sanitizer_print_memory_profile(size_t top_percent); #ifdef __cplusplus } // extern "C" #endif |