summaryrefslogtreecommitdiff
path: root/lib/profile/InstrProfilingFile.c
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2016-05-07 20:07:09 +0000
committerRenato Golin <renato.golin@linaro.org>2016-05-07 20:07:09 +0000
commitf97746032152365913ac99ae6d8dbe98990830cf (patch)
tree8a146b02b42142dd7bd5884fe5c3ce42c5d03314 /lib/profile/InstrProfilingFile.c
parent2c920abc2fc34be7f400179ebc284ec2832f77b0 (diff)
Revert "[profile] Simplify value profile writing"
This reverts commit r268840, as it breaks Thumb2 self-hosting. There is something unstable in the profiling for Thumb2 that needs to be sorted out before we continue implementing these changes to the profiler. See PR27667. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@268864 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/InstrProfilingFile.c')
-rw-r--r--lib/profile/InstrProfilingFile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/profile/InstrProfilingFile.c b/lib/profile/InstrProfilingFile.c
index 14f7517b6..9d63269eb 100644
--- a/lib/profile/InstrProfilingFile.c
+++ b/lib/profile/InstrProfilingFile.c
@@ -39,12 +39,15 @@ lprofCreateBufferIOInternal(void *File, uint32_t BufferSz) {
static int writeFile(FILE *File) {
const char *BufferSzStr = 0;
+ uint64_t ValueDataSize = 0;
+ struct ValueProfData **ValueDataArray =
+ __llvm_profile_gather_value_data(&ValueDataSize);
FreeHook = &free;
CallocHook = &calloc;
BufferSzStr = getenv("LLVM_VP_BUFFER_SIZE");
if (BufferSzStr && BufferSzStr[0])
VPBufferSize = atoi(BufferSzStr);
- return lprofWriteData(fileWriter, File, lprofGatherValueProfData);
+ return lprofWriteData(fileWriter, File, ValueDataArray, ValueDataSize);
}
static int writeFileWithName(const char *OutputName) {