• Home
  • History
  • Annotate
  • only in /external/compiler-rt/lib/profile/
History log of /external/compiler-rt/lib/profile/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5d71de26cedae3dafc17449fe0182045c0bd20e8 21-Jul-2014 Stephen Hines <srhines@google.com> Update compiler-rt for rebase to r212749.

Includes a cherry-pick of:
r213309 - fixes umodsi3

Change-Id: Ic7367e3586b6af7ef74bee6a8cf437d5f28d975a
2d1fdb26e458c4ddc04155c1d421bced3ba90cd0 29-May-2014 Stephen Hines <srhines@google.com> Update compiler-rt aosp/master for 3.5 (r209699) rebase.

Change-Id: I158a30186f0faea2e2400e9dfdd878db2eb40e90
7bb5d49a6402c5a1d20911e6992ebb7e9e4468c4 12-Nov-2013 Yuchen Wu <yuchenericwu@hotmail.com> Added summary info to GCDAProfiling.

This function will be called by GCOVProfiling to write and update object
and program summaries to be read in by llvm-cov.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194499 91177308-0d34-0410-b5e6-96231b3b80d8
08a0e08a8df2511452a2f2e5cdcf7b1c0096f088 11-Sep-2013 Bill Wendling <isanbard@gmail.com> Fix typo

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190543 91177308-0d34-0410-b5e6-96231b3b80d8
7ab94ea0d5182da0e0ed1dc2c3cf40beccbf25b9 10-Sep-2013 Bill Wendling <isanbard@gmail.com> Don't allow a NULL-length file. Try to revert to the buffered version.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190359 91177308-0d34-0410-b5e6-96231b3b80d8
007a9771d648ff5e8f6e01a3984f007272e87e37 27-Jun-2013 Bill Wendling <isanbard@gmail.com> Revert hack that omits errno on Darwin platforms. We now have an acceptable 'errno' header.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185106 91177308-0d34-0410-b5e6-96231b3b80d8
cf5fb62c0206c6544c464fa1b414bbfa26cb3244 26-Jun-2013 Chandler Carruth <chandlerc@gmail.com> Fix a use after free I introduced and that Bill caught in code review
(thanks!) by deferring the free of the filename until we finish writing
the coverage data to that file.

Bill, let me know if you'd prefer a different approach!

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184895 91177308-0d34-0410-b5e6-96231b3b80d8
7caabbd43ef867fa93317bef61924197b97ea1c7 25-Jun-2013 Bill Wendling <isanbard@gmail.com> Don't use 'errno.h' on Apple just yet. This breaks for some of our buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184878 91177308-0d34-0410-b5e6-96231b3b80d8
254abfa43326c2d49143529c26a86a27356e1243 25-Jun-2013 Chandler Carruth <chandlerc@gmail.com> Address a few of the issues in GCDAProfiling I noted when looking
through Bill's patch:

1) Correctly test the file descriptor after the sceond attempt at
creating the file.
2) Make the filename a global so that we can issue error messages from
other routines.
3) Check errno in several places and print it out so that errors are
easier to track down.

I don't really expect any of these to fix the current failures I'm
seeing, but I'm hopeful they'll at least let me debug them.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184799 91177308-0d34-0410-b5e6-96231b3b80d8
e97262dc8ddfc6aa52871692569059b17c01d193 25-Jun-2013 Chandler Carruth <chandlerc@gmail.com> Remove the sysroot restriction from building GCDAProfiling.c.

We really need the C standard library to be available to implement the
profiling runtime library reasonably, and replicating everything in the
SDKs tree really isn't addressing any problems we have. Notably, all of
the sanitizer runtimes take the same approach, and this isn't a library
which could end up in a bootstrapping problem where the system headers
aren't even available.

This will hopefully prevent subsequent changes which start using various
other bits of C standard library to make things more debuggable.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184798 91177308-0d34-0410-b5e6-96231b3b80d8
2811a0ccbadb9f8c50fe0b6aa8e4e39193fef4e7 23-May-2013 Bill Wendling <isanbard@gmail.com> Don't override 'mode' and cleanup some variable names.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182599 91177308-0d34-0410-b5e6-96231b3b80d8
468eb10c6051c6f93df75cfc34fc98180dea1bbf 23-May-2013 Bill Wendling <isanbard@gmail.com> Add 'mode' parameter when using 'O_CREAT'. Thanks to Evgeniy for pointing this out.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182598 91177308-0d34-0410-b5e6-96231b3b80d8
d06f2fc03087e7cccda19bd550bf6fb3bc2f5ae7 23-May-2013 Bill Wendling <isanbard@gmail.com> Performance improvement.

Using fwrite and fread was very *very* slow. The resulting code was multiple
times slower than GCC's implementation of gcov. Replace the fwrite/fread system
with an mmap() version.

If the `.gcda' file doesn't exist, we (re)allocate a buffer that we write
into. That gets written to the `.gcda' file in one chunk. If the `.gcda' file
already exists, we simply mmap() the file, modify the mapped data, and use
msync() to write the contents out to disk. It's much easier than implementing
our own buffering scheme, and we don't have to use fwrite's and fread's

For those who are numbers-oriented, here are some timings:

GCC Verison

`.gcda' files don't exist: 23s
`.gcda' files do exist: 14s

LLVM Version (before this change)

`.gcda' files don't exist: 28s
`.gcda' files do exist: 28s

LLVM Version (with this change)

`.gcda' files don't exist: 18s
`.gcda' files do exist: 4s

It's a win-win-win-win-lose-win-win scenario!


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182563 91177308-0d34-0410-b5e6-96231b3b80d8
2a46a60510948b5005d62025fbba307a0323ed8d 15-May-2013 Bill Wendling <isanbard@gmail.com> Try to improve performance by using a read/write buffer instead of I/O.

The calls to fwrite/fread can be very expensive. GCC avoids this by using a
buffer to read and write from the file, thus limiting the number of fwrite/fread


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181924 91177308-0d34-0410-b5e6-96231b3b80d8
346e348af5740db3660c84490d2c1bbba7c570e5 04-May-2013 Bill Wendling <isanbard@gmail.com> I was wrong in my testing.

There isn't a speedup when using unbuffered I/O. It slows it down in fact.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181060 91177308-0d34-0410-b5e6-96231b3b80d8
d83a6d8bafbf2afa3ebcf9e006bf0c7414f9b2dc 03-May-2013 Bill Wendling <isanbard@gmail.com> Use unbuffered I/O. This reduces the runtime by about half. Our implementation is now only about 5 times slower than gcc's.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180980 91177308-0d34-0410-b5e6-96231b3b80d8
4aa08fae9b02ba9a0701fe27f58e2645d236798b 22-Apr-2013 Bill Wendling <isanbard@gmail.com> Improve performance of file I/O.

The fread / fwrite calls were happening for each timer. However, that could be
pretty expensive for a large number of timers. Instead, read and write the
timers in one call.

This gives ~10% speedup in compilation time.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179990 91177308-0d34-0410-b5e6-96231b3b80d8
4df99d2565a29889ca23a7cc11ed73e3c055b751 25-Mar-2013 Alexey Samsonov <samsonov@google.com> Add basic support for building profile compiler-rt library in CMake build on Darwin

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177870 91177308-0d34-0410-b5e6-96231b3b80d8
84b46d300c7a4f1c3ea4e452791de7733ce0d143 20-Mar-2013 Bill Wendling <isanbard@gmail.com> Create a coverage initialization function.

This function replaces the call of `atexit' from being generated in the compile
units. Basically, it registers the "writeout" and "flush" functions (if
present). It will generate calls to the `atexit' function for cleanups and final
writeout functions, but only once. This is better than checking for `main',
because a library may not have a `main' function in it.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177578 91177308-0d34-0410-b5e6-96231b3b80d8
c533304a95fbed444ea02f5f9e7c6e37debd1c43 19-Mar-2013 Bill Wendling <isanbard@gmail.com> Add a way to register and execute "writeout" functions.

It may be prohibitively expensive to write out >1000 files at the same time. So
we would rather emit them serially. These functions allow the GCOV
implementation to register the functions that writeout the GCOV information per
compile unit. At exit, they are written.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177436 91177308-0d34-0410-b5e6-96231b3b80d8
e75628e9e9bba6c65b067372d381d9e03560923a 19-Mar-2013 Alexey Samsonov <samsonov@google.com> Don't use --sysroot to linux SDK when building libprofile - SDK on Linux seems to be incomplete.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177396 91177308-0d34-0410-b5e6-96231b3b80d8
c9de451e97b85e9712939ac2bfb02295645e2e0f 19-Mar-2013 Alexey Samsonov <samsonov@google.com> Support CMake build of profile runtime library on Linux

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177382 91177308-0d34-0410-b5e6-96231b3b80d8
a539183bf29a42ae584244106e48c99c6630e8cd 18-Mar-2013 Bill Wendling <isanbard@gmail.com> Add some GCOV functions that register all of the __llvm_gcov_flush() functions.

The __llvm_gcov_flush() functions only work for the local compile unit. However,
when __gcov_flush() is called, the user expects all of the counters to be
flushed, not just the ones in the current compile unit.

This adds some library functions that register the flush functions. It also
defined __gcov_flush() so that loops through that list and calls the functions.

PR15191 & <rdar://problem/13167507>

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177337 91177308-0d34-0410-b5e6-96231b3b80d8
07020829d181dcd352ff6f01eab4d353c37a19b6 09-Mar-2013 Nick Lewycky <nicholas@mxc.ca> Don't emit the extra checksum into the .gcda file if the user hasn't asked for
it. Fortunately, versions of gcov that predate the extra checksum also ignore
any extra data, so this isn't a problem. This matches the API change made in

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176746 91177308-0d34-0410-b5e6-96231b3b80d8
42296c7b5d69e6d79390005b6e1861ca66e3a0cb 07-Mar-2013 Nick Lewycky <nicholas@mxc.ca> Take the GCDA version string as an input to llvm_gcda_start_file.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176618 91177308-0d34-0410-b5e6-96231b3b80d8
58c400c58019070045e548bb5173b22af092f314 28-Feb-2013 Nick Lewycky <nicholas@mxc.ca> Holy macaroons, somebody made a copy of llvm/runtime/profile/GCDAProfiling.c,
didn't delete the original, and now they've diverged. I have no idea what's
going on. Apply my patch in r176173 to this one too, this one looks newer?

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176236 91177308-0d34-0410-b5e6-96231b3b80d8
9c994aae092ddbc786ceb27668f38571de926e5b 17-Sep-2012 Bill Wendling <isanbard@gmail.com> Remove debugging code.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164052 91177308-0d34-0410-b5e6-96231b3b80d8
df11061d6df6e7018c34fc23274c40c36db4731a 14-Sep-2012 Bill Wendling <isanbard@gmail.com> Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163930 91177308-0d34-0410-b5e6-96231b3b80d8
843f359862fb8370eacf8aed4e749c46a92b2e38 14-Sep-2012 Bill Wendling <isanbard@gmail.com> Add support for reading the GCDA file and merging the arc information.

With the advent of the __llvm_gcov_flush function, we need to be able to merge
counts into the .gcda files in an intelligent manner. This involves reading the
file if it exists, adding the counts together, and then writing the results.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163923 91177308-0d34-0410-b5e6-96231b3b80d8
666772c9934fac81d457c74d3eeca381652d0873 15-Jun-2012 Bill Wendling <isanbard@gmail.com> Free the allocated filename. Found by clang static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158514 91177308-0d34-0410-b5e6-96231b3b80d8
ec63f456de18b9ac75d7546f8a53beb6ce048e67 28-May-2012 Bill Wendling <isanbard@gmail.com> Add support for the GCOV_PREFIX_STRIP env variable which tries to strip off the first 'n' directories from the filename.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157574 91177308-0d34-0410-b5e6-96231b3b80d8
015b7e06622b7538419d8c158c4c84b781310096 28-May-2012 Bill Wendling <isanbard@gmail.com> Simplify the logic that tries to open the GCDA file at all costs. Basically, if
we can't open the file even after creating all of the directories to it, then
just give up.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157572 91177308-0d34-0410-b5e6-96231b3b80d8
906d5a5d38f2984a9b78a0786016a3d67d0798e9 28-May-2012 Bill Wendling <isanbard@gmail.com> * A bit of cleanup of the 'recursive_mkdir'. No functionality change.
* Check for absolute paths before using the GCOV_PREFIX.
* Don't add an ending path separator if there's already one.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157571 91177308-0d34-0410-b5e6-96231b3b80d8
de47cb8f12474c7c528a84de0ea73c743c33f015 28-May-2012 Bill Wendling <isanbard@gmail.com> Don't use 'strrchr', which isn't implemented here yet.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157560 91177308-0d34-0410-b5e6-96231b3b80d8
5a240c5c1746d07351fc38deb81c1794e8668d15 28-May-2012 Bill Wendling <isanbard@gmail.com> Sync with old GCOV runtime library's file.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157559 91177308-0d34-0410-b5e6-96231b3b80d8
f06648acf50b17b4a90abb46eb4515947f96fecd 02-Dec-2011 Daniel Dunbar <daniel@zuster.org> build: Add ModuleName per-subdir variable as a way to organize the different
sets of functions/objects into high level groups. Currently we have "builtins"
(the main compiler-rt code), "profile", and "asan".
- Use this to define CommonFunctions and ArchFunctions to only reference the
builtins functions.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145674 91177308-0d34-0410-b5e6-96231b3b80d8
8c88119d6334a470e3ad638c5a1f1b42c4258ac9 17-Nov-2011 Daniel Dunbar <daniel@zuster.org> lib: Import GCDA profiling support from LLVM.
- I'm in the process of moving this here but it will live in both places until
the ancilliary support is ready.
- Currently unused.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@144865 91177308-0d34-0410-b5e6-96231b3b80d8