#include "InstrProfiling.h"
#include "InstrProfilingInternal.h"
#include "InstrProfilingPort.h"
static int ContinuouslySyncProfile = …;
static unsigned PageSize = …;
COMPILER_RT_VISIBILITY int __llvm_profile_is_continuous_mode_enabled(void) { … }
COMPILER_RT_VISIBILITY void __llvm_profile_enable_continuous_mode(void) { … }
COMPILER_RT_VISIBILITY void __llvm_profile_disable_continuous_mode(void) { … }
COMPILER_RT_VISIBILITY void __llvm_profile_set_page_size(unsigned PS) { … }
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_size_for_buffer(void) { … }
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_num_data(const __llvm_profile_data *Begin,
const __llvm_profile_data *End) { … }
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_data_size(const __llvm_profile_data *Begin,
const __llvm_profile_data *End) { … }
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_num_vtable(const VTableProfData *Begin,
const VTableProfData *End) { … }
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_vtable_section_size(const VTableProfData *Begin,
const VTableProfData *End) { … }
COMPILER_RT_VISIBILITY size_t __llvm_profile_counter_entry_size(void) { … }
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_num_counters(const char *Begin, const char *End) { … }
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_counters_size(const char *Begin, const char *End) { … }
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_num_bitmap_bytes(const char *Begin,
const char *End) { … }
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_name_size(const char *Begin, const char *End) { … }
static uint64_t calculateBytesNeededToPageAlign(uint64_t Offset) { … }
static int needsCounterPadding(void) { … }
COMPILER_RT_VISIBILITY
int __llvm_profile_get_padding_sizes_for_counters(
uint64_t DataSize, uint64_t CountersSize, uint64_t NumBitmapBytes,
uint64_t NamesSize, uint64_t VTableSize, uint64_t VNameSize,
uint64_t *PaddingBytesBeforeCounters, uint64_t *PaddingBytesAfterCounters,
uint64_t *PaddingBytesAfterBitmapBytes, uint64_t *PaddingBytesAfterNames,
uint64_t *PaddingBytesAfterVTable, uint64_t *PaddingBytesAfterVName) { … }
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_size_for_buffer_internal(
const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd,
const char *CountersBegin, const char *CountersEnd, const char *BitmapBegin,
const char *BitmapEnd, const char *NamesBegin, const char *NamesEnd,
const VTableProfData *VTableBegin, const VTableProfData *VTableEnd,
const char *VNamesBegin, const char *VNamesEnd) { … }
COMPILER_RT_VISIBILITY
void initBufferWriter(ProfDataWriter *BufferWriter, char *Buffer) { … }
COMPILER_RT_VISIBILITY int __llvm_profile_write_buffer(char *Buffer) { … }
COMPILER_RT_VISIBILITY int __llvm_profile_write_buffer_internal(
char *Buffer, const __llvm_profile_data *DataBegin,
const __llvm_profile_data *DataEnd, const char *CountersBegin,
const char *CountersEnd, const char *BitmapBegin, const char *BitmapEnd,
const char *NamesBegin, const char *NamesEnd) { … }