diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-03-20 20:00:44 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-03-20 20:00:44 +0000 |
commit | 466c14d333316d80cdf0f3526988eb6cde998c30 (patch) | |
tree | 1eff7457191629e0366f63573395fc608e4097aa /lib/profile/InstrProfiling.c | |
parent | 26fd98f10dccdd6665e7308bb4835173f75628a0 (diff) |
PGO: Change runtime prefix from pgo to profile
These functions are in the profile runtime. PGO comes later.
Unfortunately, there's only room for 16 characters in a Darwin section,
so use __llvm_prf_ instead of __llvm_profile_ for section names.
<rdar://problem/15943240>
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/InstrProfiling.c')
-rw-r--r-- | lib/profile/InstrProfiling.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/profile/InstrProfiling.c b/lib/profile/InstrProfiling.c index 936b8def3..45c824c84 100644 --- a/lib/profile/InstrProfiling.c +++ b/lib/profile/InstrProfiling.c @@ -10,9 +10,9 @@ #include "InstrProfiling.h" #include <string.h> -/* TODO: void __llvm_pgo_get_size_for_buffer(void); */ +/* TODO: void __llvm_profile_get_size_for_buffer(void); */ -static void writeFunction(FILE *OutputFile, const __llvm_pgo_data *Data) { +static void writeFunction(FILE *OutputFile, const __llvm_profile_data *Data) { /* TODO: Requires libc: break requirement by writing directly to a buffer * instead of a FILE stream. */ @@ -25,20 +25,20 @@ static void writeFunction(FILE *OutputFile, const __llvm_pgo_data *Data) { fprintf(OutputFile, "\n"); } -void __llvm_pgo_write_buffer(FILE *OutputFile) { +void __llvm_profile_write_buffer(FILE *OutputFile) { /* TODO: Requires libc: break requirement by taking a char* buffer instead of * a FILE stream. */ - const __llvm_pgo_data *I, *E; + const __llvm_profile_data *I, *E; - for (I = __llvm_pgo_data_begin(), E = __llvm_pgo_data_end(); + for (I = __llvm_profile_data_begin(), E = __llvm_profile_data_end(); I != E; ++I) writeFunction(OutputFile, I); } -void __llvm_pgo_reset_counters(void) { - uint64_t *I = __llvm_pgo_counters_begin(); - uint64_t *E = __llvm_pgo_counters_end(); +void __llvm_profile_reset_counters(void) { + uint64_t *I = __llvm_profile_counters_begin(); + uint64_t *E = __llvm_profile_counters_end(); memset(I, 0, sizeof(uint64_t)*(E - I)); } |