| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Profile runtime can generate an empty raw profile (when there is no function in
the shared library). This empty profile is treated as a text format profile. A
test format profile without the flag of "#IR" is thought to be a clang
generated profile. So in llvm profile merging, we will get a bogus warning of
"Merge IR generated profile with Clang generated profile."
The fix here is to skip the empty profile (when the buffer size is 0) for
profile merge.
Reviewers: vsk, davidxl
Differential Revision: http://reviews.llvm.org/D25687
llvm-svn: 284659
|
|
|
|
|
|
|
|
|
|
| |
Add support for loading multiple coverage readers into a single
CoverageMapping instance. This should make it easier to prepare a
unified coverage report for multiple binaries.
Differential Revision: https://reviews.llvm.org/D25535
llvm-svn: 284251
|
|
|
|
| |
llvm-svn: 284063
|
|
|
|
| |
llvm-svn: 282952
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the comparison function into the only place there it is used,
i.e. the call to std::stable_sort in CoverageMappingWriter::write().
Add sorting by region kinds as it is required to ensure stable order
in our tests and to simplify D23987.
Differential Revision: https://reviews.llvm.org/D24034
llvm-svn: 280198
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Fix a couple issues limiting the application of indirect call promotion
in ThinLTO mode:
- Invoke indirect call promotion before globalopt, since it may
eliminate imported functions which appear unreferenced.
- Invoke indirect call promotion with InLTO=true so that the PGOFuncName
metadata is used to get the name for locals which would have been
renamed during promotion.
Reviewers: davidxl, mehdi_amini
Subscribers: Prazek, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D24004
llvm-svn: 280024
|
|
|
|
|
|
| |
No functionality change is intended.
llvm-svn: 278417
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D23291
llvm-svn: 278364
|
|
|
|
|
|
|
|
|
|
| |
Move needsComdatForCounter() to lib/ProfileData/InstrProf.cpp from
lib/Transforms/Instrumentation/InstrProfiling.cpp to make is available for
other files.
Differential Revision: https://reviews.llvm.org/D22643
llvm-svn: 276330
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a "-j" option to llvm-profdata to control the number of threads used.
Auto-detect NumThreads when it isn't specified, and avoid spawning threads when
they wouldn't be beneficial.
I tested this patch using a raw profile produced by clang (147MB). Here is the
time taken to merge 4 copies together on my laptop:
No thread pool: 112.87s user 5.92s system 97% cpu 2:01.08 total
With 2 threads: 134.99s user 26.54s system 164% cpu 1:33.31 total
Changes since the initial commit:
- When handling odd-length inputs, call ThreadPool::wait() before merging the
last profile. Should fix a race/off-by-one (see r275937).
Differential Revision: https://reviews.llvm.org/D22438
llvm-svn: 275938
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r275921. It broke the ppc64be bot:
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/3537
I'm not sure why it broke, but based on the output, it looks like an
off-by-one (one profile left un-merged).
llvm-svn: 275937
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a "-j" option to llvm-profdata to control the number of threads
used. Auto-detect NumThreads when it isn't specified, and avoid spawning
threads when they wouldn't be beneficial.
I tested this patch using a raw profile produced by clang (147MB). Here is the
time taken to merge 4 copies together on my laptop:
No thread pool: 112.87s user 5.92s system 97% cpu 2:01.08 total
With 2 threads: 134.99s user 26.54s system 164% cpu 1:33.31 total
Differential Revision: https://reviews.llvm.org/D22438
llvm-svn: 275921
|
|
|
|
| |
llvm-svn: 275514
|
|
|
|
| |
llvm-svn: 275337
|
|
|
|
|
|
|
| |
Patch by Jake VanAdrighem
Differential Revision: http://reviews.llvm.org/D22028
llvm-svn: 275193
|
|
|
|
|
|
|
|
|
| |
This reverts commit 520a8298d8ef676b5da617ba3d2c7fa37381e939 (r273055).
This is breaking stage2 instrumented builds with "malformed coverage
data" errors.
llvm-svn: 274106
|
|
|
|
|
|
| |
This reverts commit 1037ef2574adde2103ad221d63834c3e1df4a776.
llvm-svn: 274105
|
|
|
|
|
|
|
|
| |
Pass a `MemoryBuffer &` to BinaryCoverageReader::create() instead of a
`std::unique_ptr<MemoryBuffer> &`. This makes it easier to reason about
the ownership of the buffer at a glance.
llvm-svn: 273326
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, frontends which emit source-based code coverage have to
duplicate logic to encode filenames and raw coverage mappings properly.
This violates an abstraction layer and forces frontends to copy tricky
code.
Introduce llvm::coverage::encodeFilenamesAndRawMappings() to take care
of this.
This will help us experiment with zlib-compressing coverage mapping
data.
llvm-svn: 273055
|
|
|
|
|
|
|
|
|
|
|
|
| |
readFunctionRecords is used to iterate through the entries of the
coverage mapping section. Instead of expecting the function to update
the iterator through a `const char *&` parameter, just return the
updated iterator.
This will help us experiment with zlib-compressing coverage mapping
data.
llvm-svn: 273052
|
|
|
|
|
|
|
|
| |
End-end test with no integrated assembly should be added
at some point (not done now because some bots are not properly configured to
support -no-integrated-as)
llvm-svn: 272376
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when the object is from a slice of a Mach-O Universal Binary use something like
"foo.o (for architecture i386)" as part of the error message when expected.
Also fixed places in these tools that were ignoring object file errors from
MachOUniversalBinary::getAsObjectFile() when the code moved on to see if
the slice was an archive.
To do this MachOUniversalBinary::getAsObjectFile() and
MachOUniversalBinary::getObjectForArch() were changed from returning
ErrorOr<...> to Expected<...> then that was threaded up to its users.
Converting these interfaces to Expected<> from ErrorOr<> does involve
touching a number of places. To contain the changes for now the use of
errorToErrorCode() is still used in two places yet to be fully converted.
llvm-svn: 271332
|
|
|
|
| |
llvm-svn: 271180
|
|
|
|
|
|
| |
No functionality change intended.
llvm-svn: 271021
|
|
|
|
|
|
|
|
| |
This helps make clear that we're moving away from std::error_code.
Differential Revision: http://reviews.llvm.org/D20592
llvm-svn: 270604
|
|
|
|
| |
llvm-svn: 270195
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for an inline function.
If an inline function is observed but unused in a translation unit, dummy
coverage mapping data with zero hash is stored for this function.
If such a coverage mapping section came earlier than real one, the latter
was ignored. As a result, llvm-cov was unable to show coverage information
for those functions.
Differential Revision: http://reviews.llvm.org/D20286
llvm-svn: 270194
|
|
|
|
|
|
|
|
| |
This removes the subclasses of ProfileSummary, moves the members of the derived classes to the base class.
Differential Revision: http://reviews.llvm.org/D20390
llvm-svn: 270143
|
|
|
|
|
|
|
|
| |
This splits ProfileSummary into two classes: a ProfileSummary class that has methods to convert from/to metadata and a ProfileSummaryBuilder class that computes the profiles summary which is in ProfileData.
Differential Revision: http://reviews.llvm.org/D20314
llvm-svn: 270136
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.
Changes since the initial commit:
- Fix error message printing in llvm-profdata.
- Check errors in loadTestingFormat() + annotateAllFunctions().
- Defer error handling in InstrProfIterator to InstrProfReader.
- Remove the base ProfError class to work around an MSVC ICE.
Differential Revision: http://reviews.llvm.org/D19901
llvm-svn: 270020
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'covmapping' files.
Coverage mapping data is organized in a sequence of blocks, each of which is expected
to be aligned by 8 bytes. This feature is used when reading those blocks, see
VersionedCovMapFuncRecordReader::readFunctionRecords(). If a misaligned covearge
mapping data has more than one block, it causes llvm-cov to fail.
Differential Revision: http://reviews.llvm.org/D20285
llvm-svn: 269887
|
|
|
|
|
|
|
|
| |
This reverts commit r269694. MSVC says:
error C2086: 'char llvm::ProfErrorInfoBase<enum llvm::instrprof_error>::ID' : redefinition
llvm-svn: 269700
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.
Changes since the initial commit:
- Address undefined-var-template warning.
- Fix error message printing in llvm-profdata.
- Check errors in loadTestingFormat() + annotateAllFunctions().
- Defer error handling in InstrProfIterator to InstrProfReader.
Differential Revision: http://reviews.llvm.org/D19901
llvm-svn: 269694
|
|
|
|
|
|
|
| |
This reverts commit r269491. It triggers warnings with Clang, breaking
builds for -Werror users including several build bots.
llvm-svn: 269547
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.
Changes since the initial commit:
- Fix error message printing in llvm-profdata.
- Check errors in loadTestingFormat() + annotateAllFunctions().
- Defer error handling in InstrProfIterator to InstrProfReader.
Differential Revision: http://reviews.llvm.org/D19901
llvm-svn: 269491
|
|
|
|
|
|
|
|
| |
Use Error in InstrProf and Coverage, NFC"
This reverts commit r269462. It fails two llvm-profdata tests.
llvm-svn: 269466
|
|
|
|
|
|
|
|
|
| |
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.
Differential Revision: http://reviews.llvm.org/D19901
llvm-svn: 269462
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D20082
llvm-svn: 269222
|
|
|
|
| |
llvm-svn: 269199
|
|
|
|
| |
llvm-svn: 269138
|
|
|
|
| |
llvm-svn: 269131
|
|
|
|
|
|
|
|
|
| |
The value-data line is <PGOFuncName>:<Count_Value>. PGOFuncName might contain
':' for the internal linkage functions. We therefore need to use rsplit,
rather split, to extract the data from the line. This fixes the error when
merging a text profile file to an indexed profile file.
llvm-svn: 268818
|
|
|
|
|
|
| |
Thanks to David Li for the clarification.
llvm-svn: 268669
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D19956
llvm-svn: 268667
|
|
|
|
|
|
|
|
| |
for the same area.
Differential Revision: http://reviews.llvm.org/D18831
llvm-svn: 268620
|
|
|
|
|
|
|
|
|
| |
CovMapFuncReader::get should propagate up errors from InstrProfSymtab.
This is part of a series of patches to transition ProfileData over to
the stricter Error/Expected interface.
llvm-svn: 268428
|
|
|
|
|
|
|
|
|
|
| |
Be more specific in describing compression failures. Also, check for
this kind of error in emitNameData().
This is part of a series of patches to transition ProfileData over to
the stricter Error/Expected interface.
llvm-svn: 268400
|
|
|
|
| |
llvm-svn: 268312
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D19333
llvm-svn: 268089
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in case of combined regions.
If several regions cover the same area of code, we have to restore
the combined value for that area when return from a nested region.
This patch achieves that by combining regions before calling buildSegments.
Differential Revision: http://reviews.llvm.org/D18610
llvm-svn: 267390
|