Exemple #1
0
static uint64_t get_size_for_buffer(int flags)
{
        if (flags & PGO_HIB) {
                return __llvm_profile_get_size_for_buffer_internal(
                        &__pgo_hib_DataStart, &__pgo_hib_DataEnd,
                        &__pgo_hib_CountersStart, &__pgo_hib_CountersEnd,
                        &__pgo_hib_NamesStart, &__pgo_hib_NamesEnd);
        } else {
                return __llvm_profile_get_size_for_buffer();
        }
}
uint64_t __llvm_profile_get_size_for_buffer(void) {
  const __llvm_profile_data *DataBegin = __llvm_profile_begin_data();
  const __llvm_profile_data *DataEnd = __llvm_profile_end_data();
  const uint64_t *CountersBegin = __llvm_profile_begin_counters();
  const uint64_t *CountersEnd = __llvm_profile_end_counters();
  const char *NamesBegin = __llvm_profile_begin_names();
  const char *NamesEnd = __llvm_profile_end_names();

  return __llvm_profile_get_size_for_buffer_internal(
      DataBegin, DataEnd, CountersBegin, CountersEnd, NamesBegin, NamesEnd);
}