History log of /external/llvm/lib/IR/GCOV.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd81d94322a39503e4a3e87b6ee03d4fcb3465fb 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/lib/IR/GCOV.cpp
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/lib/IR/GCOV.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/IR/GCOV.cpp
d881c1bdd1f63bbbdb8eec5f6ae7fd765103972f 15-Nov-2013 Benjamin Kramer <benny.kra@googlemail.com> llvm-cov: Clean up memory leaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
bdc23320c10f58f9579a397bd36584dcbd702fae 14-Nov-2013 NAKAMURA Takumi <geek4civic@gmail.com> IR/GCOV.cpp: Use PRIu64 as format string with uint64_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
12e90cb69a0a39d0db208de98162e39a2e3d6d1e 14-Nov-2013 NAKAMURA Takumi <geek4civic@gmail.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
4bd0224887a8de1434186cad2f618c18dea06c0b 14-Nov-2013 Yuchen Wu <yuchenericwu@hotmail.com> llvm-cov: Slightly improved error checking.

- readInt() should check all 4 bytes can be read, not just 1.
- In the event of false data in the gcno file, it was possible to index
into a non-existent index of SmallVector, causing assertion error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
131a764e0e7abc90b322fd568e042d3c5a0633af 14-Nov-2013 Yuchen Wu <yuchenericwu@hotmail.com> llvm-cov: Removed StringMap holding GCOVLines.

According to the hazy gcov documentation, it appeared to be technically
possible for lines within a block to belong to different source files.
However, upon further investigation, gcov does not actually support
multiple source files for a single block.

This change removes a level of separation between blocks and lines by
replacing the StringMap of GCOVLines with a SmallVector of ints
representing line numbers. This also means that the GCOVLines class is
no longer needed.

This paves the way for supporting the "-a" option, which will output
block information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
dbb51ff01fd08df39e5040c1cd9edacdc3e4308a 14-Nov-2013 Yuchen Wu <yuchenericwu@hotmail.com> llvm-cov: Replaced asserts with proper error handling.

Unified the interface for read functions. They all return a boolean
indicating if the read from file succeeded. Functions that previously
returned the read value now store it into a variable that is passed in
by reference instead. Callers will need to check the return value to
detect if an error occurred.

Also added a new test which ensures that no assertions occur when file
contains invalid data. llvm-cov should return with error code 1 upon
failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
f44533c65e351329306aec7bb9e3eeab26c009b6 05-Nov-2013 Yuchen Wu <yuchenericwu@hotmail.com> Revert "llvm-cov: Added command-line option to change dir."

This reverts commit d8acf0078cf363252727acff00f85ae8074f95b3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
d8acf0078cf363252727acff00f85ae8074f95b3 05-Nov-2013 Yuchen Wu <yuchenericwu@hotmail.com> llvm-cov: Added command-line option to change dir.

This will allow for much easier testing when the input files are in a
different folder from the test script.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
e85959cb2cb6f82959b3cf1a9ef59c6d793a2556 05-Nov-2013 Yuchen Wu <yuchenericwu@hotmail.com> Support for reading run counts in llvm-cov.

This patch enables llvm-cov to correctly output the run count stored in
the GCDA file. GCOVProfiling currently does not generate this
information, so the GCDA run data had to be hacked on from a GCDA file
generated by gcc. This is corrected by a subsequent patch.

With the run and program data included, both llvm-cov and gcov produced
the same output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
daaa8b720b026c83bf6d4307042057665348b222 02-Nov-2013 Yuchen Wu <yuchenericwu@hotmail.com> Added command-line option to output llvm-cov to file.

Added -o option to llvm-cov. If no output file is specified, it defaults
to STDOUT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
81e3828be14cf5b35329c0a2372acf998980f271 25-Oct-2013 Yuchen Wu <yuchenericwu@hotmail.com> llvm-cov dump to dbgs() instead of outs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
76fa4d629b22903632529e2cb19c86105a0d1247 25-Oct-2013 Yuchen Wu <yuchenericwu@hotmail.com> Support for reading program counts in llvm-cov.

llvm-cov will now be able to read program counts from the GCDA file and
output it in the same format as gcov. The program summary tag was
identified from gcov-io.h as "\0\0\0\a3".

There is currently a bug in GCOVProfiling.cpp which does not generate
the
run- or program-counting IR, so this change was tested manually by
modifying the GCDA file and comparing the gcov and llvm-cov outputs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
cbbd20879e8acf35d3326a2459e17a298b5f5d15 24-Oct-2013 Yuchen Wu <yuchenericwu@hotmail.com> Fixed llvm-cov to count edges instead of blocks.

This was a fundamental flaw in llvm-cov where it treated the values in
the GCDA files as block counts instead of edge counts. This created
incorrect line counts when branching was present. Instead, the edge
counts should be summed to obtain the correct block count.

The fix was tested using custom test files as well as single source
files from the test-suite directory. The behaviour can be verified by
reading the GCOV documentation that describes the GCDA spec ("ARC_COUNTS
gives the counter values for those arcs that are instrumented") and the
header description provided by GCOVProfiling.cpp ("instruments the code
that runs to records (sic) the edges between blocks that run and emit a
complementary "gcda" file on exit").

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
9db9663d1d2e4e336c2787bacff4ee7125622e21 23-Oct-2013 Yuchen Wu <yuchenericwu@hotmail.com> Use a map instead of vector to store line counts.

There are a few motivations for this:
- Using a map allows for checking if line is in map. This differentiates
unexecutable lines (such as comments) from unexecuted logical lines of
code. "#####" is now outputted in this case, in line with gcov.
- Source files are no longer read in twice: once when storing the line
counts, and once when outputting the data.
- Greatly simplifies the function FileInfo::addLineCount().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
752d303a103a4b2504ddf50c0613a3c2f3536014 23-Oct-2013 Yuchen Wu <yuchenericwu@hotmail.com> Test commit. Added whitespace in GCOV.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
67fa53989a7bb05083966a694ad0c2e9b62ed683 22-Oct-2013 Bob Wilson <bob.wilson@apple.com> llvm-cov: Use uint32_t for loop variables to be more consistent.

The loop bounds here are uint32_t variables, so it makes sense for the
loop variables to have the same type.

Patch by Yuchen Wu!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
0a2463c990db33dd5fc1a15b70bcc38d4c273af7 22-Oct-2013 Bob Wilson <bob.wilson@apple.com> llvm-cov: fix a typo and rename a variable.

Rename Size to EndPos, which makes more sense because the variable
stores the last location of the blocks.

Patch by Yuchen Wu!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
51ec77d880ce53cbc8a48168185edc085df9b6d9 22-Oct-2013 Bob Wilson <bob.wilson@apple.com> Fix llvm-cov counts to be 64-bit integers to avoid overflows.

Line counts in llvm-cov are read in as 64-bit integers but were being truncated
to 32-bit in collectLineCounts(), which caused overflow for large counts.
This patch fixes all counts to be uint64_t.

Patch by Yuchen Wu!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193172 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
e877eebfe9d716ed1101aecf958af473836e70e1 22-Oct-2013 Bob Wilson <bob.wilson@apple.com> Change llvm-cov output formatting to be more similar to gcov.

- Replaced tabs with proper padding
- print() takes two arguments, which are the GCNO and GCDA filenames
- Files are listed at the top of output, appended by line 0
- Stripped strings of trailing \0s
- Removed last two lines of whitespace in output

Patch by Yuchen Wu!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
32c69dd1abf419742d99c59e7d54812e315cbb2d 22-Oct-2013 Bob Wilson <bob.wilson@apple.com> Move the printing of llvm-cov information out from collectLineCounts().

collectLineCounts() should only organize the output data. This is done in
anticipation of subsequent changes which will pass in GCNO and GCDA filenames
into the print function where it is printed similar to the gcov output.

Patch by Yuchen Wu!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
6227d5c690504c7ada5780c00a635b282c46e275 04-Jul-2013 Craig Topper <craig.topper@gmail.com> Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
a37d96a04b44b98dff5fbb4d5d1427bacb57c651 25-Jun-2013 Bill Wendling <isanbard@gmail.com> The GCDA 402 format won't have a second checksum either.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp
c2c50cdcdc19a1bca993c06d13d8cdca87083ce4 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Rename VMCore directory to IR.

Aside from moving the actual files, this patch only updates the build
system and the source file comments under lib/... that are relevant.

I'll be updating other docs and other files in smaller subsequnet
commits.

While I've tried to test this, but it is entirely possible that there
will still be some build system fallout.

Also, note that I've not changed the library name itself: libLLVMCore.a
is still the library name. I'd be interested in others' opinions about
whether we should rename this as well (I think we should, just not sure
what it might break)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/IR/GCOV.cpp