xref: /freebsd-src/contrib/llvm-project/compiler-rt/lib/profile/InstrProfiling.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
10b57cec5SDimitry Andric /*===- InstrProfiling.h- Support library for PGO instrumentation ----------===*\
20b57cec5SDimitry Andric |*
30b57cec5SDimitry Andric |* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric |* See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric |*
70b57cec5SDimitry Andric \*===----------------------------------------------------------------------===*/
80b57cec5SDimitry Andric 
90b57cec5SDimitry Andric #ifndef PROFILE_INSTRPROFILING_H_
100b57cec5SDimitry Andric #define PROFILE_INSTRPROFILING_H_
110b57cec5SDimitry Andric 
120b57cec5SDimitry Andric #include "InstrProfilingPort.h"
130b57cec5SDimitry Andric #include <stdio.h>
140b57cec5SDimitry Andric 
157a6dacacSDimitry Andric // Make sure __LLVM_INSTR_PROFILE_GENERATE is always defined before
167a6dacacSDimitry Andric // including instr_prof_interface.h so the interface functions are
177a6dacacSDimitry Andric // declared correctly for the runtime.
187a6dacacSDimitry Andric // __LLVM_INSTR_PROFILE_GENERATE is always `#undef`ed after the header,
197a6dacacSDimitry Andric // because compiler-rt does not support profiling the profiling runtime itself.
207a6dacacSDimitry Andric #ifndef __LLVM_INSTR_PROFILE_GENERATE
217a6dacacSDimitry Andric #define __LLVM_INSTR_PROFILE_GENERATE
227a6dacacSDimitry Andric #endif
237a6dacacSDimitry Andric #include "profile/instr_prof_interface.h"
247a6dacacSDimitry Andric #undef __LLVM_INSTR_PROFILE_GENERATE
257a6dacacSDimitry Andric 
260b57cec5SDimitry Andric #define INSTR_PROF_VISIBILITY COMPILER_RT_VISIBILITY
27480093f4SDimitry Andric #include "profile/InstrProfData.inc"
280b57cec5SDimitry Andric 
290b57cec5SDimitry Andric enum ValueKind {
300b57cec5SDimitry Andric #define VALUE_PROF_KIND(Enumerator, Value, Descr) Enumerator = Value,
31480093f4SDimitry Andric #include "profile/InstrProfData.inc"
320b57cec5SDimitry Andric };
330b57cec5SDimitry Andric 
340b57cec5SDimitry Andric typedef void *IntPtrT;
350b57cec5SDimitry Andric typedef struct COMPILER_RT_ALIGNAS(INSTR_PROF_DATA_ALIGNMENT)
360b57cec5SDimitry Andric     __llvm_profile_data {
370b57cec5SDimitry Andric #define INSTR_PROF_DATA(Type, LLVMType, Name, Initializer) Type Name;
38480093f4SDimitry Andric #include "profile/InstrProfData.inc"
390b57cec5SDimitry Andric } __llvm_profile_data;
400b57cec5SDimitry Andric 
410b57cec5SDimitry Andric typedef struct __llvm_profile_header {
420b57cec5SDimitry Andric #define INSTR_PROF_RAW_HEADER(Type, Name, Initializer) Type Name;
43480093f4SDimitry Andric #include "profile/InstrProfData.inc"
440b57cec5SDimitry Andric } __llvm_profile_header;
450b57cec5SDimitry Andric 
460b57cec5SDimitry Andric typedef struct ValueProfNode * PtrToNodeT;
470b57cec5SDimitry Andric typedef struct ValueProfNode {
480b57cec5SDimitry Andric #define INSTR_PROF_VALUE_NODE(Type, LLVMType, Name, Initializer) Type Name;
49480093f4SDimitry Andric #include "profile/InstrProfData.inc"
500b57cec5SDimitry Andric } ValueProfNode;
510b57cec5SDimitry Andric 
52*0fca6ea1SDimitry Andric typedef struct COMPILER_RT_ALIGNAS(INSTR_PROF_DATA_ALIGNMENT) VTableProfData {
53*0fca6ea1SDimitry Andric #define INSTR_PROF_VTABLE_DATA(Type, LLVMType, Name, Initializer) Type Name;
54*0fca6ea1SDimitry Andric #include "profile/InstrProfData.inc"
55*0fca6ea1SDimitry Andric } VTableProfData;
56*0fca6ea1SDimitry Andric 
570b57cec5SDimitry Andric /*!
58480093f4SDimitry Andric  * \brief Return 1 if profile counters are continuously synced to the raw
59480093f4SDimitry Andric  * profile via an mmap(). This is in contrast to the default mode, in which
60480093f4SDimitry Andric  * the raw profile is written out at program exit time.
61480093f4SDimitry Andric  */
62480093f4SDimitry Andric int __llvm_profile_is_continuous_mode_enabled(void);
63480093f4SDimitry Andric 
64480093f4SDimitry Andric /*!
65480093f4SDimitry Andric  * \brief Enable continuous mode.
66480093f4SDimitry Andric  *
67480093f4SDimitry Andric  * See \ref __llvm_profile_is_continuous_mode_enabled. The behavior is undefined
68480093f4SDimitry Andric  * if continuous mode is already enabled, or if it cannot be enable due to
69480093f4SDimitry Andric  * conflicting options.
70480093f4SDimitry Andric  */
71480093f4SDimitry Andric void __llvm_profile_enable_continuous_mode(void);
72480093f4SDimitry Andric 
73480093f4SDimitry Andric /*!
745f757f3fSDimitry Andric  * \brief Disable continuous mode.
755f757f3fSDimitry Andric  *
765f757f3fSDimitry Andric  */
775f757f3fSDimitry Andric void __llvm_profile_disable_continuous_mode(void);
785f757f3fSDimitry Andric 
795f757f3fSDimitry Andric /*!
80e8d8bef9SDimitry Andric  * \brief Set the page size.
81e8d8bef9SDimitry Andric  *
82e8d8bef9SDimitry Andric  * This is a pre-requisite for enabling continuous mode. The buffer size
83e8d8bef9SDimitry Andric  * calculation code inside of libprofile cannot simply call getpagesize(), as
84e8d8bef9SDimitry Andric  * it is not allowed to depend on libc.
85e8d8bef9SDimitry Andric  */
86e8d8bef9SDimitry Andric void __llvm_profile_set_page_size(unsigned PageSize);
87e8d8bef9SDimitry Andric 
88e8d8bef9SDimitry Andric /*!
890b57cec5SDimitry Andric  * \brief Get number of bytes necessary to pad the argument to eight
900b57cec5SDimitry Andric  * byte boundary.
910b57cec5SDimitry Andric  */
920b57cec5SDimitry Andric uint8_t __llvm_profile_get_num_padding_bytes(uint64_t SizeInBytes);
930b57cec5SDimitry Andric 
940b57cec5SDimitry Andric /*!
950b57cec5SDimitry Andric  * \brief Get required size for profile buffer.
960b57cec5SDimitry Andric  */
970b57cec5SDimitry Andric uint64_t __llvm_profile_get_size_for_buffer(void);
980b57cec5SDimitry Andric 
990b57cec5SDimitry Andric /*!
1000b57cec5SDimitry Andric  * \brief Write instrumentation data to the given buffer.
1010b57cec5SDimitry Andric  *
1020b57cec5SDimitry Andric  * \pre \c Buffer is the start of a buffer at least as big as \a
1030b57cec5SDimitry Andric  * __llvm_profile_get_size_for_buffer().
1040b57cec5SDimitry Andric  */
1050b57cec5SDimitry Andric int __llvm_profile_write_buffer(char *Buffer);
1060b57cec5SDimitry Andric 
1070b57cec5SDimitry Andric const __llvm_profile_data *__llvm_profile_begin_data(void);
1080b57cec5SDimitry Andric const __llvm_profile_data *__llvm_profile_end_data(void);
1090b57cec5SDimitry Andric const char *__llvm_profile_begin_names(void);
1100b57cec5SDimitry Andric const char *__llvm_profile_end_names(void);
111*0fca6ea1SDimitry Andric const char *__llvm_profile_begin_vtabnames(void);
112*0fca6ea1SDimitry Andric const char *__llvm_profile_end_vtabnames(void);
11304eeddc0SDimitry Andric char *__llvm_profile_begin_counters(void);
11404eeddc0SDimitry Andric char *__llvm_profile_end_counters(void);
1155f757f3fSDimitry Andric char *__llvm_profile_begin_bitmap(void);
1165f757f3fSDimitry Andric char *__llvm_profile_end_bitmap(void);
1170b57cec5SDimitry Andric ValueProfNode *__llvm_profile_begin_vnodes();
1180b57cec5SDimitry Andric ValueProfNode *__llvm_profile_end_vnodes();
119*0fca6ea1SDimitry Andric const VTableProfData *__llvm_profile_begin_vtables();
120*0fca6ea1SDimitry Andric const VTableProfData *__llvm_profile_end_vtables();
1210b57cec5SDimitry Andric uint32_t *__llvm_profile_begin_orderfile();
1220b57cec5SDimitry Andric 
1230b57cec5SDimitry Andric /*!
1240b57cec5SDimitry Andric  * \brief Merge profile data from buffer.
1250b57cec5SDimitry Andric  *
1265f757f3fSDimitry Andric  * Read profile data from buffer \p Profile and merge with in-process profile
1275f757f3fSDimitry Andric  * counters and bitmaps. The client is expected to have checked or already
1285f757f3fSDimitry Andric  * know the profile data in the buffer matches the in-process counter
1295f757f3fSDimitry Andric  * structure before calling it. Returns 0 (success) if the profile data is
1305f757f3fSDimitry Andric  * valid. Upon reading invalid/corrupted profile data, returns 1 (failure).
1310b57cec5SDimitry Andric  */
132fe6060f1SDimitry Andric int __llvm_profile_merge_from_buffer(const char *Profile, uint64_t Size);
1330b57cec5SDimitry Andric 
1340b57cec5SDimitry Andric /*! \brief Check if profile in buffer matches the current binary.
1350b57cec5SDimitry Andric  *
1360b57cec5SDimitry Andric  *  Returns 0 (success) if the profile data in buffer \p Profile with size
1370b57cec5SDimitry Andric  *  \p Size was generated by the same binary and therefore matches
1385f757f3fSDimitry Andric  *  structurally the in-process counters and bitmaps. If the profile data in
1395f757f3fSDimitry Andric  *  buffer is not compatible, the interface returns 1 (failure).
1400b57cec5SDimitry Andric  */
1410b57cec5SDimitry Andric int __llvm_profile_check_compatibility(const char *Profile,
1420b57cec5SDimitry Andric                                        uint64_t Size);
1430b57cec5SDimitry Andric 
1440b57cec5SDimitry Andric /*!
1450b57cec5SDimitry Andric  * \brief Counts the number of times a target value is seen.
1460b57cec5SDimitry Andric  *
1470b57cec5SDimitry Andric  * Records the target value for the CounterIndex if not seen before. Otherwise,
1480b57cec5SDimitry Andric  * increments the counter associated w/ the target value.
1490b57cec5SDimitry Andric  * void __llvm_profile_instrument_target(uint64_t TargetValue, void *Data,
1500b57cec5SDimitry Andric  *                                       uint32_t CounterIndex);
1510b57cec5SDimitry Andric  */
1520b57cec5SDimitry Andric void INSTR_PROF_VALUE_PROF_FUNC(
1530b57cec5SDimitry Andric #define VALUE_PROF_FUNC_PARAM(ArgType, ArgName, ArgLLVMType) ArgType ArgName
154480093f4SDimitry Andric #include "profile/InstrProfData.inc"
1550b57cec5SDimitry Andric     );
1560b57cec5SDimitry Andric 
1570b57cec5SDimitry Andric void __llvm_profile_instrument_target_value(uint64_t TargetValue, void *Data,
1580b57cec5SDimitry Andric                                             uint32_t CounterIndex,
1590b57cec5SDimitry Andric                                             uint64_t CounterValue);
1600b57cec5SDimitry Andric 
1610b57cec5SDimitry Andric /*!
1620b57cec5SDimitry Andric  * \brief Write instrumentation data to the current file.
1630b57cec5SDimitry Andric  *
1640b57cec5SDimitry Andric  * Writes to the file with the last name given to \a *
1650b57cec5SDimitry Andric  * __llvm_profile_set_filename(),
1660b57cec5SDimitry Andric  * or if it hasn't been called, the \c LLVM_PROFILE_FILE environment variable,
1670b57cec5SDimitry Andric  * or if that's not set, the last name set to INSTR_PROF_PROFILE_NAME_VAR,
1680b57cec5SDimitry Andric  * or if that's not set,  \c "default.profraw".
1690b57cec5SDimitry Andric  */
1700b57cec5SDimitry Andric int __llvm_profile_write_file(void);
1710b57cec5SDimitry Andric 
1720b57cec5SDimitry Andric int __llvm_orderfile_write_file(void);
1730b57cec5SDimitry Andric 
1740b57cec5SDimitry Andric /*!
175349cc55cSDimitry Andric  * \brief Set the FILE object for writing instrumentation data. Return 0 if set
176349cc55cSDimitry Andric  * successfully or return 1 if failed.
1770b57cec5SDimitry Andric  *
1780b57cec5SDimitry Andric  * Sets the FILE object to be used for subsequent calls to
1790b57cec5SDimitry Andric  * \a __llvm_profile_write_file(). The profile file name set by environment
1800b57cec5SDimitry Andric  * variable, command-line option, or calls to \a  __llvm_profile_set_filename
1810b57cec5SDimitry Andric  * will be ignored.
1820b57cec5SDimitry Andric  *
1830b57cec5SDimitry Andric  * \c File will not be closed after a call to \a __llvm_profile_write_file() but
1840b57cec5SDimitry Andric  * it may be flushed. Passing NULL restores default behavior.
1850b57cec5SDimitry Andric  *
1860b57cec5SDimitry Andric  * If \c EnableMerge is nonzero, the runtime will always merge profiling data
1870b57cec5SDimitry Andric  * with the contents of the profiling file. If EnableMerge is zero, the runtime
1880b57cec5SDimitry Andric  * may still merge the data if it would have merged for another reason (for
1890b57cec5SDimitry Andric  * example, because of a %m specifier in the file name).
19068d75effSDimitry Andric  *
19168d75effSDimitry Andric  * Note: There may be multiple copies of the profile runtime (one for each
19268d75effSDimitry Andric  * instrumented image/DSO). This API only modifies the file object within the
19368d75effSDimitry Andric  * copy of the runtime available to the calling image.
194480093f4SDimitry Andric  *
195349cc55cSDimitry Andric  * Warning: This is a no-op if EnableMerge is 0 in continuous mode (\ref
196349cc55cSDimitry Andric  * __llvm_profile_is_continuous_mode_enabled), because disable merging requires
197349cc55cSDimitry Andric  * copying the old profile file to new profile file and this function is usually
198349cc55cSDimitry Andric  * used when the proess doesn't have permission to open file.
1990b57cec5SDimitry Andric  */
200349cc55cSDimitry Andric int __llvm_profile_set_file_object(FILE *File, int EnableMerge);
2010b57cec5SDimitry Andric 
2020b57cec5SDimitry Andric /*! \brief Register to write instrumentation data to file at exit. */
2030b57cec5SDimitry Andric int __llvm_profile_register_write_file_atexit(void);
2040b57cec5SDimitry Andric 
2050b57cec5SDimitry Andric /*! \brief Initialize file handling. */
2060b57cec5SDimitry Andric void __llvm_profile_initialize_file(void);
2070b57cec5SDimitry Andric 
2085ffd83dbSDimitry Andric /*! \brief Initialize the profile runtime. */
2095ffd83dbSDimitry Andric void __llvm_profile_initialize(void);
2105ffd83dbSDimitry Andric 
2110b57cec5SDimitry Andric /*!
2120b57cec5SDimitry Andric  * \brief Return path prefix (excluding the base filename) of the profile data.
2130b57cec5SDimitry Andric  * This is useful for users using \c -fprofile-generate=./path_prefix who do
2140b57cec5SDimitry Andric  * not care about the default raw profile name. It is also useful to collect
2150b57cec5SDimitry Andric  * more than more profile data files dumped in the same directory (Online
2160b57cec5SDimitry Andric  * merge mode is turned on for instrumented programs with shared libs).
2170b57cec5SDimitry Andric  * Side-effect: this API call will invoke malloc with dynamic memory allocation.
2180b57cec5SDimitry Andric  */
2190b57cec5SDimitry Andric const char *__llvm_profile_get_path_prefix();
2200b57cec5SDimitry Andric 
2210b57cec5SDimitry Andric /*!
2220b57cec5SDimitry Andric  * \brief Return filename (including path) of the profile data. Note that if the
2230b57cec5SDimitry Andric  * user calls __llvm_profile_set_filename later after invoking this interface,
2240b57cec5SDimitry Andric  * the actual file name may differ from what is returned here.
22568d75effSDimitry Andric  * Side-effect: this API call will invoke malloc with dynamic memory allocation
22668d75effSDimitry Andric  * (the returned pointer must be passed to `free` to avoid a leak).
22768d75effSDimitry Andric  *
22868d75effSDimitry Andric  * Note: There may be multiple copies of the profile runtime (one for each
22968d75effSDimitry Andric  * instrumented image/DSO). This API only retrieves the filename from the copy
23068d75effSDimitry Andric  * of the runtime available to the calling image.
2310b57cec5SDimitry Andric  */
2320b57cec5SDimitry Andric const char *__llvm_profile_get_filename();
2330b57cec5SDimitry Andric 
2340b57cec5SDimitry Andric /*! \brief Get the magic token for the file format. */
2350b57cec5SDimitry Andric uint64_t __llvm_profile_get_magic(void);
2360b57cec5SDimitry Andric 
2370b57cec5SDimitry Andric /*! \brief Get the version of the file format. */
2380b57cec5SDimitry Andric uint64_t __llvm_profile_get_version(void);
2390b57cec5SDimitry Andric 
2400b57cec5SDimitry Andric /*! \brief Get the number of entries in the profile data section. */
24104eeddc0SDimitry Andric uint64_t __llvm_profile_get_num_data(const __llvm_profile_data *Begin,
24204eeddc0SDimitry Andric                                      const __llvm_profile_data *End);
24304eeddc0SDimitry Andric 
24404eeddc0SDimitry Andric /*! \brief Get the size of the profile data section in bytes. */
2450b57cec5SDimitry Andric uint64_t __llvm_profile_get_data_size(const __llvm_profile_data *Begin,
2460b57cec5SDimitry Andric                                       const __llvm_profile_data *End);
2470b57cec5SDimitry Andric 
24804eeddc0SDimitry Andric /*! \brief Get the size in bytes of a single counter entry. */
24904eeddc0SDimitry Andric size_t __llvm_profile_counter_entry_size(void);
25004eeddc0SDimitry Andric 
25104eeddc0SDimitry Andric /*! \brief Get the number of entries in the profile counters section. */
25204eeddc0SDimitry Andric uint64_t __llvm_profile_get_num_counters(const char *Begin, const char *End);
25304eeddc0SDimitry Andric 
25404eeddc0SDimitry Andric /*! \brief Get the size of the profile counters section in bytes. */
25504eeddc0SDimitry Andric uint64_t __llvm_profile_get_counters_size(const char *Begin, const char *End);
25604eeddc0SDimitry Andric 
2575f757f3fSDimitry Andric /*! \brief Get the number of bytes in the profile bitmap section. */
2585f757f3fSDimitry Andric uint64_t __llvm_profile_get_num_bitmap_bytes(const char *Begin,
2595f757f3fSDimitry Andric                                              const char *End);
2605f757f3fSDimitry Andric 
2615f757f3fSDimitry Andric /*! \brief Get the size of the profile name section in bytes. */
2625f757f3fSDimitry Andric uint64_t __llvm_profile_get_name_size(const char *Begin, const char *End);
2635f757f3fSDimitry Andric 
264*0fca6ea1SDimitry Andric /*! \brief Get the number of virtual table profile data entries */
265*0fca6ea1SDimitry Andric uint64_t __llvm_profile_get_num_vtable(const VTableProfData *Begin,
266*0fca6ea1SDimitry Andric                                        const VTableProfData *End);
267*0fca6ea1SDimitry Andric 
268*0fca6ea1SDimitry Andric /*! \brief Get the size of virtual table profile data in bytes. */
269*0fca6ea1SDimitry Andric uint64_t __llvm_profile_get_vtable_section_size(const VTableProfData *Begin,
270*0fca6ea1SDimitry Andric                                                 const VTableProfData *End);
271*0fca6ea1SDimitry Andric 
272*0fca6ea1SDimitry Andric /* ! \brief Given the sizes of the data and counter information, computes the
273*0fca6ea1SDimitry Andric  * number of padding bytes before and after the counter section, as well as the
274*0fca6ea1SDimitry Andric  * number of padding bytes after other setions in the raw profile.
275*0fca6ea1SDimitry Andric  * Returns -1 upon errors and 0 upon success. Output parameters should be used
276*0fca6ea1SDimitry Andric  * iff return value is 0.
277480093f4SDimitry Andric  *
278480093f4SDimitry Andric  * Note: When mmap() mode is disabled, no padding bytes before/after counters
279480093f4SDimitry Andric  * are needed. However, in mmap() mode, the counter section in the raw profile
280480093f4SDimitry Andric  * must be page-aligned: this API computes the number of padding bytes
281480093f4SDimitry Andric  * needed to achieve that.
282480093f4SDimitry Andric  */
283*0fca6ea1SDimitry Andric int __llvm_profile_get_padding_sizes_for_counters(
2845f757f3fSDimitry Andric     uint64_t DataSize, uint64_t CountersSize, uint64_t NumBitmapBytes,
285*0fca6ea1SDimitry Andric     uint64_t NamesSize, uint64_t VTableSize, uint64_t VNameSize,
286*0fca6ea1SDimitry Andric     uint64_t *PaddingBytesBeforeCounters, uint64_t *PaddingBytesAfterCounters,
287*0fca6ea1SDimitry Andric     uint64_t *PaddingBytesAfterBitmap, uint64_t *PaddingBytesAfterNames,
288*0fca6ea1SDimitry Andric     uint64_t *PaddingBytesAfterVTable, uint64_t *PaddingBytesAfterVNames);
289480093f4SDimitry Andric 
2900b57cec5SDimitry Andric /*!
2910b57cec5SDimitry Andric  * \brief Set the flag that profile data has been dumped to the file.
2920b57cec5SDimitry Andric  * This is useful for users to disable dumping profile data to the file for
2930b57cec5SDimitry Andric  * certain processes in case the processes don't have permission to write to
2940b57cec5SDimitry Andric  * the disks, and trying to do so would result in side effects such as crashes.
2950b57cec5SDimitry Andric  */
2960b57cec5SDimitry Andric void __llvm_profile_set_dumped();
2970b57cec5SDimitry Andric 
2980b57cec5SDimitry Andric /*!
29968d75effSDimitry Andric  * This variable is defined in InstrProfilingRuntime.cpp as a hidden
3000b57cec5SDimitry Andric  * symbol. Its main purpose is to enable profile runtime user to
3010b57cec5SDimitry Andric  * bypass runtime initialization code -- if the client code explicitly
3020b57cec5SDimitry Andric  * define this variable, then InstProfileRuntime.o won't be linked in.
3030b57cec5SDimitry Andric  * Note that this variable's visibility needs to be hidden so that the
3040b57cec5SDimitry Andric  * definition of this variable in an instrumented shared library won't
3050b57cec5SDimitry Andric  * affect runtime initialization decision of the main program.
3060b57cec5SDimitry Andric  *  __llvm_profile_profile_runtime. */
3070b57cec5SDimitry Andric COMPILER_RT_VISIBILITY extern int INSTR_PROF_PROFILE_RUNTIME_VAR;
3080b57cec5SDimitry Andric 
3090b57cec5SDimitry Andric /*!
310349cc55cSDimitry Andric  * This variable is defined in InstrProfilingVersionVar.c as a hidden symbol
311349cc55cSDimitry Andric  * (except on Apple platforms where this symbol is checked by TAPI).  Its main
312349cc55cSDimitry Andric  * purpose is to encode the raw profile version value and other format related
313349cc55cSDimitry Andric  * information such as whether the profile is from IR based instrumentation. The
314349cc55cSDimitry Andric  * variable is defined as weak so that compiler can emit an overriding
315349cc55cSDimitry Andric  * definition depending on user option.
3160b57cec5SDimitry Andric  */
317*0fca6ea1SDimitry Andric COMPILER_RT_VISIBILITY extern uint64_t
318*0fca6ea1SDimitry Andric     INSTR_PROF_RAW_VERSION_VAR; /* __llvm_profile_raw_version */
3190b57cec5SDimitry Andric 
3200b57cec5SDimitry Andric /*!
3210b57cec5SDimitry Andric  * This variable is a weak symbol defined in InstrProfiling.c. It allows
3220b57cec5SDimitry Andric  * compiler instrumentation to provide overriding definition with value
3230b57cec5SDimitry Andric  * from compiler command line. This variable has default visibility.
3240b57cec5SDimitry Andric  */
3250b57cec5SDimitry Andric extern char INSTR_PROF_PROFILE_NAME_VAR[1]; /* __llvm_profile_filename. */
3260b57cec5SDimitry Andric 
3270b57cec5SDimitry Andric #endif /* PROFILE_INSTRPROFILING_H_ */
328