summaryrefslogtreecommitdiff
path: root/lib/profile/InstrProfilingInternal.h
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
* [profile] Port the runtime to Solaris (retry)Vedant Kumar2017-12-141-1/+2
| | | | | | | | | | | | | 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
* Revert "(HEAD -> master, origin/master, origin/HEAD) [profile] Port the ↵Vedant Kumar2017-12-141-2/+1
| | | | | | | | | | | 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
* [profile] Port the runtime to SolarisVedant Kumar2017-12-141-1/+2
| | | | | | | | | | | 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
* Revert r312240Alex Lorenz2017-08-311-5/+5
| | | | | | | | 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
* Build LLVM with -Wstrict-prototypes enabledAlex Lorenz2017-08-311-5/+5
| | | | | | | | | | | | 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
* [PGO] Reduce IO in profile dumping with mergingXinliang David Li2017-06-281-3/+5
| | | | | | | | | 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
* [PGO] Refactor file/buffer writer callback interfaces /NFCXinliang David Li2017-06-271-12/+17
| | | | | | | | | | | | 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
* [Profile] Remove unused variableXinliang David Li2016-09-221-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@282198 91177308-0d34-0410-b5e6-96231b3b80d8
* [Profile] Implement new API __llvm_profile_dumpXinliang David Li2016-08-091-0/+7
| | | | | | | | | | | | 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
* [Profile] move utility interfaces to the right header /NFCXinliang David Li2016-07-191-14/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276021 91177308-0d34-0410-b5e6-96231b3b80d8
* Code refactoring: extract path prefix handling codeXinliang David Li2016-07-181-0/+14
| | | | | | | | | .. 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
* [profile] in-process merging support part-3Xinliang David Li2016-06-081-0/+7
| | | | | | | | 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
* [profile] Static counter allocation for value profiling (part-2)Xinliang David Li2016-05-211-0/+3
| | | | | | | | 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
* [profile] entry eviction support in value profilerXinliang David Li2016-05-191-0/+4
| | | | | | | | 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
* [profile] Allow max vals per site to be controllable at runtimeXinliang David Li2016-05-181-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269993 91177308-0d34-0410-b5e6-96231b3b80d8
* [profile] Eliminate dynamic memory allocation for vp writingXinliang David Li2016-05-141-6/+38
| | | | | | | | | | | | 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
* [profile] Eliminate dynamic memory allocation for buffered writerXinliang David Li2016-05-131-5/+6
| | | | | | | | | | 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
* Reapply r268840: [profile] Simplify value profile writingXinliang David Li2016-05-101-4/+7
| | | | | | | | | | 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
* Fix variable visibilityXinliang David Li2016-05-091-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@268952 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[profile] Simplify value profile writing"Renato Golin2016-05-071-8/+4
| | | | | | | | 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
* [profile] Simplify value profile writingXinliang David Li2016-05-071-4/+8
| | | | | | | | | | | 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
* [PGO] internal API name cleanups (for better consistency)Xinliang David Li2016-03-061-22/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@262788 91177308-0d34-0410-b5e6-96231b3b80d8
* [PGO] Add API for profile merge from bufferXinliang David Li2016-03-031-1/+6
| | | | | | | 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
* [PGO]: Refactor VP data writerXinliang David Li2015-12-291-1/+48
| | | | | | | | | | | 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
* [PGO]: Do not update Data->Value field during profile write.Xinliang David Li2015-12-291-2/+5
| | | | | | | | | | | 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
* [PGO] Move buffer write callback to a common fileXinliang David Li2015-12-221-0/+2
| | | | | | | | 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
* [PGO] Move impl specific decl to InstrProfilingInternal.h (NFC)Xinliang David Li2015-12-101-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255290 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix -Wpointer-sign warningXinliang David Li2015-11-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253770 91177308-0d34-0410-b5e6-96231b3b80d8
* [PGO] Implement a more robust/readable Writer callback interfaceXinliang David Li2015-11-211-4/+10
| | | | | | | | | | | | | | (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
* [PGO] Minor cleanups (from review feedback)Xinliang David Li2015-11-191-3/+4
| | | | | | | | | 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
* Fix format of previous patch (NFC)Xinliang David Li2015-11-181-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253503 91177308-0d34-0410-b5e6-96231b3b80d8
* [PGO] Refactor File and Buffer API profile writing codeXinliang David Li2015-11-181-0/+15
| | | | | | | | | | | 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
* profile: Add low level versions of profile buffer functionsJustin Bogner2014-12-091-0/+40
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