summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/profile/InstrProfilingBuffer.c
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2015-11-19 07:21:47 +0000
committerXinliang David Li <davidxl@google.com>2015-11-19 07:21:47 +0000
commite8efaeae4d9bd45d6569595ca35cfb4f82a74616 (patch)
treecf19e2d8bf574b4a3baf4e71d28efdcf391f7726 /compiler-rt/lib/profile/InstrProfilingBuffer.c
parent1ca72e1846fca95dcb4182c2672ff90c71511965 (diff)
downloadbcm5719-llvm-e8efaeae4d9bd45d6569595ca35cfb4f82a74616.tar.gz
bcm5719-llvm-e8efaeae4d9bd45d6569595ca35cfb4f82a74616.zip
[PGO] Minor cleanups (from review feedback)
1. fix naming problem of file/buffer writer 2. change BufferOrFile to WriterCtx 3. move writer and writerctx together llvm-svn: 253545
Diffstat (limited to 'compiler-rt/lib/profile/InstrProfilingBuffer.c')
-rw-r--r--compiler-rt/lib/profile/InstrProfilingBuffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingBuffer.c b/compiler-rt/lib/profile/InstrProfilingBuffer.c
index bb1f9ea9804..dc5958ea5f2 100644
--- a/compiler-rt/lib/profile/InstrProfilingBuffer.c
+++ b/compiler-rt/lib/profile/InstrProfilingBuffer.c
@@ -41,7 +41,7 @@ uint64_t __llvm_profile_get_size_for_buffer_internal(
PROFILE_RANGE_SIZE(Counters) * sizeof(uint64_t) + NamesSize + Padding;
}
-static size_t BufferWriter(const void *Data, size_t ElmSize, size_t NumElm,
+static size_t bufferWriter(const void *Data, size_t ElmSize, size_t NumElm,
void **Buffer) {
size_t Length = ElmSize * NumElm;
memcpy(*Buffer, Data, Length);
@@ -51,14 +51,14 @@ static size_t BufferWriter(const void *Data, size_t ElmSize, size_t NumElm,
__attribute__((visibility("hidden"))) int
__llvm_profile_write_buffer(char *Buffer) {
- return llvmWriteProfData(Buffer, 0, 0, BufferWriter);
+ return llvmWriteProfData(Buffer, bufferWriter, 0, 0);
}
__attribute__((visibility("hidden"))) int __llvm_profile_write_buffer_internal(
char *Buffer, const __llvm_profile_data *DataBegin,
const __llvm_profile_data *DataEnd, const uint64_t *CountersBegin,
const uint64_t *CountersEnd, const char *NamesBegin, const char *NamesEnd) {
- return llvmWriteProfDataImpl(Buffer, BufferWriter, DataBegin, DataEnd,
+ return llvmWriteProfDataImpl(Buffer, bufferWriter, DataBegin, DataEnd,
CountersBegin, CountersEnd, 0, 0, NamesBegin,
NamesEnd);
}
OpenPOWER on IntegriCloud