diff options
| author | Justin Bogner <mail@justinbogner.com> | 2014-09-04 15:45:31 +0000 |
|---|---|---|
| committer | Justin Bogner <mail@justinbogner.com> | 2014-09-04 15:45:31 +0000 |
| commit | cc0d7eeb6dbf4aa1efad895ff2b8568000b02461 (patch) | |
| tree | 9d58302dddbcb687ae91af1234ae16f5499b041d /compiler-rt/lib/profile/InstrProfilingBuffer.c | |
| parent | 7c3d581e8a40c26fe2e29a565782a75d4c513383 (diff) | |
| download | bcm5719-llvm-cc0d7eeb6dbf4aa1efad895ff2b8568000b02461.tar.gz bcm5719-llvm-cc0d7eeb6dbf4aa1efad895ff2b8568000b02461.zip | |
profile: Avoid name collisions between instrumentation and runtime
The naming scheme we're using for counters in profile data shares a
prefix with some fixed names we use for the runtime, notably
__llvm_profile_data_begin and _end. Embarrassingly, this means a
function called begin() can't be instrumented.
This modifies the runtime names so as not to collide with the
instrumentation.
llvm-svn: 217166
Diffstat (limited to 'compiler-rt/lib/profile/InstrProfilingBuffer.c')
| -rw-r--r-- | compiler-rt/lib/profile/InstrProfilingBuffer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingBuffer.c b/compiler-rt/lib/profile/InstrProfilingBuffer.c index b53d4f7954b..3351b07ba6f 100644 --- a/compiler-rt/lib/profile/InstrProfilingBuffer.c +++ b/compiler-rt/lib/profile/InstrProfilingBuffer.c @@ -26,12 +26,12 @@ int __llvm_profile_write_buffer(char *Buffer) { /* Match logic in __llvm_profile_get_size_for_buffer(). * Match logic in __llvm_profile_write_file(). */ - const __llvm_profile_data *DataBegin = __llvm_profile_data_begin(); - const __llvm_profile_data *DataEnd = __llvm_profile_data_end(); - const uint64_t *CountersBegin = __llvm_profile_counters_begin(); - const uint64_t *CountersEnd = __llvm_profile_counters_end(); - const char *NamesBegin = __llvm_profile_names_begin(); - const char *NamesEnd = __llvm_profile_names_end(); + 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(); /* Calculate size of sections. */ const uint64_t DataSize = DataEnd - DataBegin; |

