From f938294524df0b8a39a220e7e77ace25edbb9bb8 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Tue, 10 May 2016 00:17:31 +0000 Subject: Reapply r268840: [profile] Simplify value profile writing Revert r268864 that reverted 268840 after underlying problem is fixed for arm bot. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@268992 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/profile/InstrProfilingInternal.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/profile/InstrProfilingInternal.h') diff --git a/lib/profile/InstrProfilingInternal.h b/lib/profile/InstrProfilingInternal.h index e72bfee71..a349244c5 100644 --- a/lib/profile/InstrProfilingInternal.h +++ b/lib/profile/InstrProfilingInternal.h @@ -98,17 +98,20 @@ int lprofBufferIOFlush(ProfBufferIO *BufferIO); uint32_t lprofBufferWriter(ProfDataIOVec *IOVecs, uint32_t NumIOVecs, void **WriterCtx); +typedef struct ValueProfData *(*VPGatherHookType)( + const __llvm_profile_data *Data); int lprofWriteData(WriterCallback Writer, void *WriterCtx, - struct ValueProfData **ValueDataArray, - const uint64_t ValueDataSize); + VPGatherHookType VPDataGatherer); int lprofWriteDataImpl(WriterCallback Writer, void *WriterCtx, const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd, const uint64_t *CountersBegin, const uint64_t *CountersEnd, - struct ValueProfData **ValueDataBeginArray, - const uint64_t ValueDataSize, const char *NamesBegin, + VPGatherHookType VPDataGatherer, const char *NamesBegin, const char *NamesEnd); +/* Gather value profile data from \c Data and return it. */ +struct ValueProfData *lprofGatherValueProfData(const __llvm_profile_data *Data); + /* Merge value profile data pointed to by SrcValueProfData into * in-memory profile counters pointed by to DstData. */ void lprofMergeValueProfData(struct ValueProfData *SrcValueProfData, -- cgit v1.2.3