diff options
author | Xinliang David Li <davidxl@google.com> | 2016-05-10 00:17:31 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2016-05-10 00:17:31 +0000 |
commit | f938294524df0b8a39a220e7e77ace25edbb9bb8 (patch) | |
tree | 1d67ced94cb76b602e4ace648daa9784ae86a30e /lib/profile/InstrProfilingInternal.h | |
parent | 4ce1f1ecd21731f9de9de7d1a7a21d07d14110f9 (diff) |
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
Diffstat (limited to 'lib/profile/InstrProfilingInternal.h')
-rw-r--r-- | lib/profile/InstrProfilingInternal.h | 11 |
1 files changed, 7 insertions, 4 deletions
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, |