summaryrefslogtreecommitdiff
path: root/lib/profile
AgeCommit message (Collapse)Author
2015-12-20[PGO] Implement BOOL_CMPXCHG for WindowsXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@256128 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19[PGO] Fix build failure with MSVCXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@256103 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17Fix typo in MSC pathXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255938 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16[PGO] cleanup: unify prefix for portability macrosXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255748 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-15[PGO] Improve prof library portabilityXinliang David Li
Patch by: Johan Engelen Introduce LLVM_LIBRARY_WEAK macro. Define LLVM_LIBRARY_WEAK and LLVM_LIBRARY_VISIBIITY for MSVC git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255688 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-15[PGO] Open file with explict binary modeXinliang David Li
Patch by: Johan Engelen On windows, opening in text mode will result in line ending chars to be appended leading to profile corruption. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255684 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10[PGO] Split value profiling runtime into its own fileXinliang David Li
Value profile runtime depends on libc which breaks buffer API implemenation with current file organization. Test case is also updated to check more symbols. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255294 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10Sync up with masterXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255293 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10[PGO] Move impl specific decl to InstrProfilingInternal.h (NFC)Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255290 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10[PGO] Move target-dependent macro to InstrProfilingPort.h (NFC)Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255285 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10[PGO] Header file cleanup (NFC)Xinliang David Li
InstrProfiling.h file declares profile runtime public APIs. It has become a dumping place for many different things, which needs cleanups. In this change, core type declarations and portability macros are moved to a new file InstrProfilingPort.h. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255270 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10[PGO] use COMPILER_RT_HAS_ATOMTICS macroXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255266 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09[PGO] Add cmake check to determine atomics op availabilityXinliang David Li
This allows the profile runtime to pick the right impl for cmp&swap for a given target. Differential Revision: http://reviews.llvm.org/D15248 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255173 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08Fix typoXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255068 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07[PGO] Stop leaking libc function to buffer API implXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254943 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-05Use macro for common code pattern (NFC)Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254831 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-04Move macro defs closer (NFC)Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254761 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-04[PGO] Fix mips test failure with new test caseXinliang David Li
cmp&swap is not well supported -- the new test case triggers some assembler error. This is a partial fix to the general problem (lack of atomics operation support for certain targets). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254701 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-04[PGO] Unify VP data format between raw and indexed profile (runtime)Xinliang David Li
With the latest refactoring and code sharing patches landed, it is possible to unify the value profile implementation between raw and indexed profile. This is part in prfofile runtime. Differential Revision: http://reviews.llvm.org/D15057 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254678 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-04Don't shadow a variable in the outer scope. Use canonical form of theJoerg Sonnenberger
array size idiom. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254673 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03[PGO] Introduce error report macro in profile-rtXinliang David Li
Also added a test case for runtime error reporting. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254625 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02Sync up with master fileXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254552 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29sync up with master fileXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254245 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28Sync up template file with masterXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254236 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26Sync up with master InstrProfData.incXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254113 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24sync up InstrProfData.inc with masterXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253943 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23[PGO] sync up target instrument decl between runtime and llvm (NFC)Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253911 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23[PGO] Unify section name, section symbol definitions (Darwin)Xinliang David Li
Replace hard-coded references to names to key section and section symbols with common macro definitions. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253907 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23[PGO] Unify section name, section symbol definitions (Linux)Xinliang David Li
Replace hard-coded references to names to key section and section symbols with common macro definitions. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253897 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23[PGO] Unify raw profile header definitionXinliang David Li
Replace duplicate definition raw header with common definition in InstrProfData.inc. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253896 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23[PGO] Use the alignment macro newly introduced (NFC)Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253895 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23Sync up template file with master (NFC)Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253894 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23[PGO] Unify per-function control data definitionXinliang David Li
Replace duplicate definition per-func profile control data with common definition in InstrProfData.inc. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253891 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23[PGO] Use common definition of value profile kindXinliang David Li
Replace duplicate definition value profile kind definitions with common definition in InstrProfData.inc. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253890 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23[PGO] Use common definition of raw magic and versionXinliang David Li
- Replace duplicate definition and use of magic in profile runtime - Replace hard coded version reference in profile runtime git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253885 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23[PGO] Start use InstrProf template file in compiler-rt/lib/profileXinliang David Li
- Replace use of __llvm_profile_value_data with common data structure. - Remve duplicate InstrProfValueNode git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253883 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23Sync up InstrProfData.inc with masterXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253881 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23[PGO] Make InstrProfData.inc available to compiler-rt.Xinliang David Li
This will enable a series of cleanup/refactoring. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253852 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23Fix a bug introduced in cleanupXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253847 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23[PGO] Compiler-rt cleanup -- introduces macros for various macrosXinliang David Li
This makes code more readable and be made more portable in the future. There is no functional change. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253845 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21Fix -Wpointer-sign warningXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253770 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21[PGO] Implement a more robust/readable Writer callback interfaceXinliang David Li
(patch suggested by silvas) With this patch, the IO information is wrapped in struct ProfDataIOVec, and interface of writerCallback takes a vector of IOVec and a pointer to writer context pointer. Differential Revision: http://reviews.llvm.org/D14859 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253764 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20[PGO] Fix buildbot failure on FreeBSD (when building __x86_64__ lib)Xinliang David Li
There seems to be a problem in system header (stdint.h) of FreeBSD where uint8_t nor uint16_t are defined. Explicitly define the key types as done for FreeBSD i386. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253703 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20[PGO] Profile runtime name cleanupsXinliang David Li
Value profile enumerator change to match LLVM code ProfData new member field name change to match LLVM code ProfData member type change to match LLVM code Do not use lower case for types that are internal to implementation (not exposed to APIs) There is no functional change. This is a preparation patch to enable more code sharing in follow up patches Differential Revision: http://reviews.llvm.org/D14841 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253700 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20Speculatively fix MIPS build bot failuresXinliang David Li
MIPS build bots failed due to lack of 64bit atomic operations. The fix is to disable VP for MIPS target until a better solution is found. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253687 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20Speculativley try to fix FreeBSD buildbots, which apparently cannot use stdint.hReid Kleckner
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253681 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19[PGO] Minor cleanups (from review feedback)Xinliang David Li
1. fix naming problem of file/buffer writer 2. change BufferOrFile to WriterCtx 3. move writer and writerctx together git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253545 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18Fix format in comments.Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253510 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18[PGO] Minor cleanups (formating, comments etc) (NFC)Xinliang David Li
1. Added missing public API decl in InstrProfiling.h 2. Clang formatting fix 3. Added more comments for new VP code 4. refactor the VP allocation code to make it more readable. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253508 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18Fix format of previous patch (NFC)Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253503 91177308-0d34-0410-b5e6-96231b3b80d8