1 /*===- InstrProfiling.h- Support library for PGO instrumentation ----------===*\
3 |* The LLVM Compiler Infrastructure
5 |* This file is distributed under the University of Illinois Open Source
6 |* License. See LICENSE.TXT for details.
8 \*===----------------------------------------------------------------------===*/
10 #ifndef PROFILE_INSTRPROFILING_INTERNALH_
11 #define PROFILE_INSTRPROFILING_INTERNALH_
13 #include "InstrProfiling.h"
16 * \brief Write instrumentation data to the given buffer, given explicit
17 * pointers to the live data in memory. This function is probably not what you
18 * want. Use __llvm_profile_get_size_for_buffer instead. Use this function if
19 * your program has a custom memory layout.
21 uint64_t __llvm_profile_get_size_for_buffer_internal(
22 const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd,
23 const uint64_t *CountersBegin, const uint64_t *CountersEnd,
24 const char *NamesBegin, const char *NamesEnd);
27 * \brief Write instrumentation data to the given buffer, given explicit
28 * pointers to the live data in memory. This function is probably not what you
29 * want. Use __llvm_profile_write_buffer instead. Use this function if your
30 * program has a custom memory layout.
32 * \pre \c Buffer is the start of a buffer at least as big as \a
33 * __llvm_profile_get_size_for_buffer_internal().
35 int __llvm_profile_write_buffer_internal(
36 char *Buffer, const __llvm_profile_data *DataBegin,
37 const __llvm_profile_data *DataEnd, const uint64_t *CountersBegin,
38 const uint64_t *CountersEnd, const char *NamesBegin, const char *NamesEnd);