aboutsummaryrefslogtreecommitdiffstats
path: root/runtime
Commit message (Collapse)AuthorAgeFilesLines
* Switch to c-style comments in a C file.David Blaikie2012-04-271-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155726 91177308-0d34-0410-b5e6-96231b3b80d8
* Defensively guard against calling malloc() with a size of zero.Ted Kremenek2012-04-261-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155661 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the correct filename for the error message.Bill Wendling2012-03-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153564 91177308-0d34-0410-b5e6-96231b3b80d8
* Use Nakamura's suggestion of bypassing using 'filename' and just the ↵Bill Wendling2012-03-281-5/+2
| | | | | | pointers directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153558 91177308-0d34-0410-b5e6-96231b3b80d8
* MSVC doesn't like the mixing of declarations and statements in a .c file.Francois Pichet2012-03-271-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153549 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to use the CWD if the path to the GCDA output is not available (e.g., theBill Wendling2012-03-271-0/+14
| | | | | | | | | executable has been moved to another machine). If that's not available (read-only or something), then exit gracefully. <rdar://problem/11111686> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153538 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing a warning in MSVC (this is also a test commit)Aaron Ballman2012-02-051-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149844 91177308-0d34-0410-b5e6-96231b3b80d8
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-121-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146409 91177308-0d34-0410-b5e6-96231b3b80d8
* PathProfiling.c: Get rid of using "inline". We may expect compiler shall ↵NAKAMURA Takumi2011-11-081-7/+2
| | | | | | optimize out "static" scope w/o "inline". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144080 91177308-0d34-0410-b5e6-96231b3b80d8
* runtime/libprofile/PathProfiling.c: Use __inline__ to appease clang ↵NAKAMURA Takumi2011-11-081-3/+3
| | | | | | | | -std=gnu89 -pedantic. FIXME: Should configure detect one? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144070 91177308-0d34-0410-b5e6-96231b3b80d8
* build: Add initial cut at LLVMBuild.txt files.Daniel Dunbar2011-11-031-0/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143634 91177308-0d34-0410-b5e6-96231b3b80d8
* Include direct.h for _mkdir on mingw32 too.Benjamin Kramer2011-10-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141495 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for warnings: ignoring return value of ‘write’, declared with ↵Galina Kistanova2011-09-221-5/+12
| | | | | | attribute warn_unused_result. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140314 91177308-0d34-0410-b5e6-96231b3b80d8
* Use version 402 for the GCDA files when compiling for Apple.Bill Wendling2011-07-281-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136369 91177308-0d34-0410-b5e6-96231b3b80d8
* Build and install the archive when building the Apple way.Bill Wendling2011-07-191-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135538 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build for (some versions of?) MinGW. Patch by Ruben Van Boxem.Eli Friedman2011-06-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133741 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the LTO stuff from the profile_rt library's Makefile.Bill Wendling2011-06-151-7/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133042 91177308-0d34-0410-b5e6-96231b3b80d8
* Add compatibility version when compiling the Apple way.Bill Wendling2011-06-131-0/+30
| | | | | | | <rdar://problem/9600408> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132929 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix MSVC warning regarding mkdir function usage.Francois Pichet2011-05-261-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132109 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 3 MSVC warnings: Francois Pichet2011-05-253-3/+3
| | | | | | | | 'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void)' atexit really expects a "void f(void)" function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132061 91177308-0d34-0410-b5e6-96231b3b80d8
* The computation of string length is not that complicated. Fix it, again. :)Nick Lewycky2011-05-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130967 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the gcov version used slightly, to make it stop causing modern gcov's toNick Lewycky2011-05-051-2/+15
| | | | | | | crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130911 91177308-0d34-0410-b5e6-96231b3b80d8
* Create the parent directories to place the .gcda files in if they don't exist.Nick Lewycky2011-05-041-0/+18
| | | | | | | | That's kinda weird because the .gcno files are supposed to already be there, but libgcov does this and somehow Google has managed to depend on it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130879 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix crash when not setting GCOV_PREFIX.Nick Lewycky2011-05-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130834 91177308-0d34-0410-b5e6-96231b3b80d8
* runtime/libprofile/PathProfiling.c: Don't use // comment in C source.NAKAMURA Takumi2011-04-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130589 91177308-0d34-0410-b5e6-96231b3b80d8
* win32: Include DataTypes.h instead of stdint.h to try and fix a Win32 buildDaniel Dunbar2011-04-291-1/+1
| | | | | | issue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130530 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup some DOS newlines.Daniel Dunbar2011-04-291-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130529 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak the MSVC build:Francois Pichet2011-04-292-3/+15
| | | | | | | | - unistd.h doesn't exist with MSVC - inline must be __inline in Microsoft C - atexit cannot take a function declared as void f(), must be void f(void). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130490 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename profile_rt.so to libprofile_rt.so under configure+make (it already wasNick Lewycky2011-04-292-3/+13
| | | | | | | | | | | | | under cmake). Add libprofile_rt.a so that we can tell clang to link against it in --coverage mode. Also turn it on by default in cmake builds. Oscar, this touches a change you made for EXCLUDE_FROM_ALL support -- I think I've done the right thing, but please let me know (or fix and commit) if not! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130470 91177308-0d34-0410-b5e6-96231b3b80d8
* Only read *predecessor once so as to fix a theoretical issue where it changesNick Lewycky2011-04-281-5/+31
| | | | | | | | | | | | | | | | | | | | between two reads (threading). Fix an off-by-one in the indirect counter table that I meant to revert after an earlier experiment. Whoops! Implement GCOV_PREFIX. Doesn't handle GCOV_PREFIX_STRIP yet. Fix an off-by-one in string emission. Extra whoops! Tolerate DISubprograms that have null Function*'s attached to them. I don't yet understand what this means, but it happens when you have a global static with a non-trivial constructor/destructor. Fix a crash on switch statements with a single successor (default-only). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130443 91177308-0d34-0410-b5e6-96231b3b80d8
* Use static inline to do the right thing when built in C99 mode. Of course,Nick Lewycky2011-04-271-2/+3
| | | | | | | C89 doesn't have an inline keyword. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130279 91177308-0d34-0410-b5e6-96231b3b80d8
* Honor LLVM_BUILD_RUNTIME.Oscar Fuentes2011-04-261-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130199 91177308-0d34-0410-b5e6-96231b3b80d8
* Add cmakefiles to build profile_rt.so!Nick Lewycky2011-04-262-0/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130191 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename everything to follow LLVM style ... I think.Nick Lewycky2011-04-262-5/+29
| | | | | | | | | | | | | | | Add support for switch and indirectbr edges. This works by densely numbering all blocks which have such terminators, and then separately numbering the possible successors. The predecessors write down a number, the successor knows its own number (as a ConstantInt) and sends that and the pointer to the number the predecessor wrote down to the runtime, who looks up the counter in a per-function table. Coverage data should now be functional, but I haven't tested it on anything other than my 2-file synthetic test program for coverage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130186 91177308-0d34-0410-b5e6-96231b3b80d8
* Write out uint64_t as i{0..32},i{33..64} instead of i{0..32},0.Benjamin Kramer2011-04-161-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129638 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use C++ comments in C code.Nick Lewycky2011-04-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129637 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename LineProfiling to GCOVProfiling to more accurately represent what itNick Lewycky2011-04-163-43/+108
| | | | | | | | does. Also mostly implement it. Still a work-in-progress, but generates legal output on crafted test cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129630 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-152-2/+2
| | | | | | | | Luis Felipe Strano Moraes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix format string warning.Benjamin Kramer2011-04-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129467 91177308-0d34-0410-b5e6-96231b3b80d8
* Use %ull here.Nick Lewycky2011-04-131-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129423 91177308-0d34-0410-b5e6-96231b3b80d8
* Print our uint64_t with the more portable (C99 and C++0x) %PRIu64 formatNick Lewycky2011-04-121-1/+3
| | | | | | | specifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129384 91177308-0d34-0410-b5e6-96231b3b80d8
* The counters are unsigned.Nick Lewycky2011-04-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129380 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for line profiling. Very work-in-progress.Nick Lewycky2011-04-122-0/+40
| | | | | | | | | | | Use debug info in the IR to find the directory/file:line:col. Each time that location changes, bump a counter. Unlike the existing profiling system, we don't try to look at argv[], and thusly don't require main() to be present in the IR. This matches GCC's technique where you specify the profiling flag when producing each .o file. The runtime library is minimal, currently just calling printf at program shutdown time. The API is designed to make it possible to emit GCOV data later on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129340 91177308-0d34-0410-b5e6-96231b3b80d8
* Implementation of path profiling.Andrew Trick2011-01-294-23/+310
| | | | | | | | | | | Modified patch by Adam Preuss. This builds on the existing framework for block tracing, edge profiling and optimal edge profiling. See -help-hidden for new flags. For documentation, see the technical report "Implementation of Path Profiling..." in llvm.org/pubs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124515 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename 'libprofile/exported_symbols.lst' to 'libprofile/libprofile.exports'.Mikhail Glushenkov2010-09-032-4/+4
| | | | | | | Makefile.rules assumes that all EXPORTED_SYMBOL_FILEs have the .exports extension. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112964 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete a blank line.Dan Gohman2010-04-161-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101459 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the export files absolute paths, and change Makefile.rulesDan Gohman2010-04-151-1/+1
| | | | | | | to expect them this way, to fix srcdir!=objdir builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101414 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use absolute path for EXPORTED_SYMBOL_FILE, this breaks under the newDaniel Dunbar2010-04-151-1/+1
| | | | | | system. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101404 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r100896 and around - this breaks the only mingw32 buildbot we have.Anton Korobeynikov2010-04-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101387 91177308-0d34-0410-b5e6-96231b3b80d8
* suck the propagating "has dynamic libs" check into a single makefile Chris Lattner2010-04-091-1/+1
| | | | | | | variable TARGET_HAS_DYNAMIC_LIBS git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100896 91177308-0d34-0410-b5e6-96231b3b80d8