summaryrefslogtreecommitdiff
path: root/lib/profile/InstrProfilingInternal.h
AgeCommit message (Collapse)Author
2017-12-14[profile] Port the runtime to Solaris (retry)Vedant Kumar
This includes a few nice bits of refactoring (e.g splitting out the exclusive locking code into a common utility). Hopefully the Windows support is fixed now. Patch by Rainer Orth! Differential Revision: https://reviews.llvm.org/D40944 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320731 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-14Revert "(HEAD -> master, origin/master, origin/HEAD) [profile] Port the ↵Vedant Kumar
runtime to Solaris" This reverts commit r320726. It looks like flock isn't available on Windows: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/21317/steps/build%20compiler-rt/logs/stdio git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320728 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-14[profile] Port the runtime to SolarisVedant Kumar
This includes a few nice bits of refactoring (e.g splitting out the exclusive locking code into a common utility). Patch by Rainer Orth! Differential Revision: https://reviews.llvm.org/D40944 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320726 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31Revert r312240Alex Lorenz
The buildbots have shown that -Wstrict-prototypes behaves differently in GCC and Clang so we should keep it disabled until Clang follows GCC's behaviour git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312246 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31Build LLVM with -Wstrict-prototypes enabledAlex Lorenz
Clang 5 supports -Wstrict-prototypes. We should use it to catch any C declarations that declare a non-prototype function. rdar://33705313 Differential Revision: https://reviews.llvm.org/D36669 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312240 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28[PGO] Reduce IO in profile dumping with mergingXinliang David Li
Differential Revision: http://reviews.llvm.org/D34709 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306561 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27[PGO] Refactor file/buffer writer callback interfaces /NFCXinliang David Li
Introduces a 'owner' struct to include the overridable write method and the write context in C. This allows easy introdution of new member API to help reduce profile merge time in the follow up patch. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306432 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22[Profile] Remove unused variableXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@282198 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-09[Profile] Implement new API __llvm_profile_dumpXinliang David Li
The API is intended to be used by user to do fine grained (per-region) control of profile dumping. Differential Revision: http://reviews.llvm.org/D23106 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278092 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-19[Profile] move utility interfaces to the right header /NFCXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276021 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18Code refactoring: extract path prefix handling codeXinliang David Li
.. into reusable interfaces. No functional change is expected. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275807 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-08[profile] in-process merging support part-3Xinliang David Li
Differential Revision: http://reviews.llvm.org/D21056 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@272227 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-21[profile] Static counter allocation for value profiling (part-2)Xinliang David Li
Differential Revision: http://reviews.llvm.org/D20460 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270337 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19[profile] entry eviction support in value profilerXinliang David Li
Differential revision: http://reviews.llvm.org/D20408 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270141 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18[profile] Allow max vals per site to be controllable at runtimeXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269993 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14[profile] Eliminate dynamic memory allocation for vp writingXinliang David Li
This is part-3 of the effort to eliminate dependency on libc allocator in instr profiler runtime. With this change, the profile dumper is completely free of malloc/calloc. Value profile instr API implementation is the only remaining piece with calloc dependency. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269576 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13[profile] Eliminate dynamic memory allocation for buffered writerXinliang David Li
With this change, dynamic memory allocation is only used for testing purpose. This change is one of the many steps to make instrument profiler dynamic allocation free. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269453 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10Reapply r268840: [profile] Simplify value profile writingXinliang David Li
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
2016-05-09Fix variable visibilityXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@268952 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-07Revert "[profile] Simplify value profile writing"Renato Golin
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
2016-05-07[profile] Simplify value profile writingXinliang David Li
With this patch, value data are longer pre-collected before writing. The code is simplified and requires less heap space for dumping. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@268840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-06[PGO] internal API name cleanups (for better consistency)Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@262788 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-03[PGO] Add API for profile merge from bufferXinliang David Li
Differential Revision: http://reviews.llvm.org/D17831 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@262644 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-29[PGO]: Refactor VP data writerXinliang David Li
Extract the buffered filer writer code used by value profile writer and turn it into common/sharable buffered fileIO interfaces. Added a test case for the buffered file writer and rewrite the VP dumping using the new APIs. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@256604 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-29[PGO]: Do not update Data->Value field during profile write.Xinliang David Li
The profile reader no longer depends on this field to be updated and point to owning func's vp data. The VP data also no longer needs to be allocated in a contiguous memory space. Differential Revision: http://reviews.llvm.org/D15258 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@256543 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-22[PGO] Move buffer write callback to a common fileXinliang David Li
This is a NFC refactoring enabling code sharing by file writer. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@256264 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-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-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 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
2015-11-18[PGO] Refactor File and Buffer API profile writing codeXinliang David Li
With this change, Buffer API and File API implementations are unified. Differential Revision: http://reviews.llvm.org/D14692 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253500 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-09profile: Add low level versions of profile buffer functionsJustin Bogner
On Darwin, compiler_rt uses magic linker symbols to find the profile counters in the __DATA segment. This is a reasonable method for normal, hosted, userspace programs. However programs with custom memory layouts, such as the kernel, will need to tell compiler_rt explicitly where to find these sections. Patch by Lawrence D'Anna. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223840 91177308-0d34-0410-b5e6-96231b3b80d8