summaryrefslogtreecommitdiff
path: root/lib/profile
AgeCommit message (Collapse)Author
2016-07-19[Profile] use portable macro /NFCXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276019 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-07-15Fix a typeo.George Burgess IV
(obligatory s/typeo/typo) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275632 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15[Profile] instroduce portability macro for dir separator(sXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275597 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-11[compiler-rt] Fix VisualStudio virtual folders layoutEtienne Bergeron
Summary: This patch is a refactoring of the way cmake 'targets' are grouped. It won't affect non-UI cmake-generators. Clang/LLVM are using a structured way to group targets which ease navigation through Visual Studio UI. The Compiler-RT projects differ from the way Clang/LLVM are grouping targets. This patch doesn't contain behavior changes. Reviewers: kubabrecka, rnk Subscribers: wang0109, llvm-commits, kubabrecka, chrisha Differential Revision: http://reviews.llvm.org/D21952 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275111 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23Use CreateFileA and add a FIXME to switch to the wide variantReid Kleckner
No functional change. Required to build with -DUNICODE, as is done in http://reviews.llvm.org/D21643 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273571 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17Fix most MSVC warnings in compiler-rt profiling libraryReid Kleckner
Here's the warnings and how they were fixed: - InstrProfilingUtil.c(110): warning C4013: '_open_osfhandle' undefined; assuming extern returning int Include io.h to get the prototype. - warning C4005: 'FILE_MAP_EXECUTE': macro redefinition Stop trying to support pre-XP versions of Windows, don't attempt to define this macro. - InstrProfilingWriter.c(271): warning C4221: nonstandard extension used: 'Data': cannot be initialized using address of automatic variable 'Header' - InstrProfilingWriter.c(275): warning C4221: nonstandard extension used: 'Data': cannot be initialized using address of automatic variable 'Zeroes' Turn this warning off. This is definitely legal in C++, all compilers accept it, and I only have room for half of one language standard in my brain. - InstrProfilingValue.c(320): warning C4113: 'uint32_t (__cdecl *)()' differs in parameter lists from 'uint32_t (__cdecl *)(void)' Fix this with an explicit (void) in the prototype. - InstrProfilingMerge.c.obj : warning LNK4006: _VPMergeHook already defined in InstrProfilingMergeFile.c.obj; second definition ignored Last remaining warning. This is from linking a selectany definition with a strong definition. We need to sort out weak symbols in compiler-rt in general, though. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273026 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14[profile] Update a warning message (NFC)Vedant Kumar
It's possible for a merge pool specifier to appear anywhere in a filename pattern. Update the warning to reflect this. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@272685 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10[profile] cleanup file setting codeXinliang David Li
Differential Revision: http://reviews.llvm.org/D21219 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@272428 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-06-08[profile] Hide some external symbols in InstrProfData.incVedant Kumar
Differential Revision: http://reviews.llvm.org/D21116 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@272167 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-08[profile] Pass extra build flags (feature enabling macros) to Darwin buildXinliang David Li
Differential Revision: http://reviews.llvm.org/D21119 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@272162 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-08[profile] Un-hide two symbolsVedant Kumar
- lprofCurFilename was intended to have external visibility. This is pending further discussion. - The raw version number doesn't need to be hidden: hiding it may make it easier to accidentally combine FE/IR profiles. See the mailing list discussion on r272081. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@272089 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-08[profile] Hide a few external symbols (NFCI)Vedant Kumar
There are still a few external symbols visible from InstrProfData.inc. The plan for dealing with those isn't as straightforward, so I'll try it in a separate commit. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@272081 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06[profile] code cleanup /NFCXinliang David Li
Address review feedback for better readability. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271922 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06[profile] in-process mergeing support (part-2)Xinliang David Li
(Part-1 merging API is in profile runtime) This patch implements a portable file opening API with exclusive access for the process. In-process profile merge requires profile file update to be atomic/fully sychronized. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271864 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31[profile] Fix PR/27917Xinliang David Li
Skip the last (possibly) incomplete node from padding bytes. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271349 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31Local var name change /NFCXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271304 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27[profile] Avoid unused variable warning.Sean Silva
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270969 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-26Add portable macro in common headerXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270928 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-26Add segment prefix for darwinXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270875 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-26Fix windows bot failureXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270864 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-26[profile] pre-allocate a small counter set in profile runtimeXinliang David Li
Tested with relavant benchmarks in SPEC2006 Differential Revision: http://reviews.llvm.org/D20651 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270862 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25[profile] Add early checking to bypass node pointer updateXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270766 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25[profile] Don't return `Node` when it is null.Sean Silva
The max warning check was masking the "return 0" codepath. See the thread "Warnings and compile-time failure on 458.sjeng" for more info. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270762 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25[profile] Further cleanup/refactor file handling codeXinliang David Li
Also get rid of the redundant strncpy calls. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270730 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25Fix braced initializer list (NFC)Teresa Johnson
After r270617 I am getting an error when building: projects/compiler-rt/lib/profile/InstrProfilingFile.c:33:36: error: missing field 'PidChars' initializer [-Werror,-Wmissing-field-initializers] lprofFilename lprofCurFilename = {0}; ^ Fix the aggregate initializer. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270697 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24[profile] clean up profile file handling codeXinliang David Li
Differentianl Revision: http://reviews.llvm.org/D20572 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270617 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24Fix typo in commentXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270524 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24[profile] clean up file initialization codeXinliang David Li
Also added more documentation. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270519 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23[profile] clean up runtime warnings.Xinliang David Li
o make warning message more meaningful to users. o add suggestion to fix the problem o limit the max number of output. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270483 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-22[profile] initialize static pool properly Xinliang David Li
Remove dependency on runtime initializer to avoid issues related to initialization order. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270371 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-22bug fix: trim section specifier name lengthXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270350 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-21Fix a typo (darwin only)Xinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270339 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-21Fix typoXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270338 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-20Use C-style comment.Sean Silva
I think we allow use of C99 for libprofile, but use a C-style comment for consistency. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270187 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Fix bot failureXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270186 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[profile] PROF_ERR, PROF_WARNXinliang David Li
1) Move common prefix to the macro def 2) Introduced PROF_WARN 3) Make error message unconditionally printed out. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270185 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[profile] Remove anther malloc useXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270181 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Add #include for PS4 getenv shim.Sean Silva
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270179 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Small typo and whitespace fix.Sean Silva
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270177 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-19Reapply^3 "[ProfileData] (compiler-rt) Use Error in InstrProf and Coverage, NFC"Vedant Kumar
Sync up with "(llvm) Use Error in InstrProf and Coverage". git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270022 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19Fix typo.Sean Silva
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270005 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-18[profile] add runtime variable documentationXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269964 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16Avoid leak. Free before resetting.Sean Silva
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269724 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16[profile] Add portability macro for atomic fetch_and_addXinliang David Li
This is another enabler patch to support value profiling without dynamic memory allocation. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269719 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16Revert "Reapply^2 "[ProfileData] (compiler-rt) Use Error in InstrProf and ↵Vedant Kumar
Coverage, NFC"" This reverts commit r269696. The llvm commit does not pass the MSVC bot. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269702 91177308-0d34-0410-b5e6-96231b3b80d8