diff options
author | nkozlovskiy <nmk@ydb.tech> | 2023-10-11 19:11:46 +0300 |
---|---|---|
committer | nkozlovskiy <nmk@ydb.tech> | 2023-10-11 19:33:28 +0300 |
commit | 61b3971447e473726d6cdb23fc298e457b4d973c (patch) | |
tree | e2a2a864bb7717f7ae6138f6a3194a254dd2c7bb /contrib/libs/clang14-rt/include/sanitizer/memprof_interface.h | |
parent | a674dc57d88d43c2e8e90a6084d5d2c988e0402c (diff) | |
download | ydb-61b3971447e473726d6cdb23fc298e457b4d973c.tar.gz |
add sanitizers dependencies
Diffstat (limited to 'contrib/libs/clang14-rt/include/sanitizer/memprof_interface.h')
-rw-r--r-- | contrib/libs/clang14-rt/include/sanitizer/memprof_interface.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/contrib/libs/clang14-rt/include/sanitizer/memprof_interface.h b/contrib/libs/clang14-rt/include/sanitizer/memprof_interface.h new file mode 100644 index 0000000000..76031de401 --- /dev/null +++ b/contrib/libs/clang14-rt/include/sanitizer/memprof_interface.h @@ -0,0 +1,65 @@ +//===-- sanitizer/memprof_interface.h --------------------------*- C++ -*-===// +// +// 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 (MemProf). +// +// Public interface header. +//===----------------------------------------------------------------------===// +#ifndef SANITIZER_MEMPROF_INTERFACE_H +#define SANITIZER_MEMPROF_INTERFACE_H + +#include <sanitizer/common_interface_defs.h> + +#ifdef __cplusplus +extern "C" { +#endif +/// Records access to a memory region (<c>[addr, addr+size)</c>). +/// +/// This memory must be previously allocated by your program. +/// +/// \param addr Start of memory region. +/// \param size Size of memory region. +void __memprof_record_access_range(void const volatile *addr, size_t size); + +/// Records access to a memory address <c><i>addr</i></c>. +/// +/// This memory must be previously allocated by your program. +/// +/// \param addr Accessed memory address +void __memprof_record_access(void const volatile *addr); + +/// User-provided callback on MemProf errors. +/// +/// You can provide a function that would be called immediately when MemProf +/// detects an error. This is useful in cases when MemProf detects an error but +/// your program crashes before the MemProf report is printed. +void __memprof_on_error(void); + +/// Prints accumulated statistics to <c>stderr</c> (useful for calling from the +/// debugger). +void __memprof_print_accumulated_stats(void); + +/// User-provided default option settings. +/// +/// You can provide your own implementation of this function to return a string +/// containing MemProf runtime options (for example, +/// <c>verbosity=1:print_stats=1</c>). +/// +/// \returns Default options string. +const char *__memprof_default_options(void); + +/// Prints the memory profile to the current profile file. +/// +/// \returns 0 on success. +int __memprof_profile_dump(void); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // SANITIZER_MEMPROF_INTERFACE_H |