History log of /llvm-project/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp (Results 51 – 75 of 141)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1f3fa96e 06-Sep-2023 Jie Fu <jiefu@tencent.com>

[llvm-cov] Fix -Wcovered-switch-default in CoverageMapping.cpp (NFC)

/Users/jiefu/llvm-project/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:959:3: error: default label in switch which covers al

[llvm-cov] Fix -Wcovered-switch-default in CoverageMapping.cpp (NFC)

/Users/jiefu/llvm-project/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:959:3: error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default]
default:
^
1 error generated.

show more ...


# cd8fe1db 06-Sep-2023 MaggieYingYi <29144504+MaggieYingYi@users.noreply.github.com>

[llvm-cov] - Output better error message when the error kind is `coveragemap_error::malforme`. (#65264)

The current llvm-cov error message for kind `coveragemap_error::malforme`, just gives the issu

[llvm-cov] - Output better error message when the error kind is `coveragemap_error::malforme`. (#65264)

The current llvm-cov error message for kind `coveragemap_error::malforme`, just gives the issue kind without any reason for what caused the issue. This patch is aimed at improving the llvm-cov error message to help identify what caused the issue.

Reviewed By: MaskRay
Close: https://github.com/llvm/llvm-project/pull/65264

show more ...


Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3
# 17cfd2e0 27-Apr-2023 Jessica Paquette <jpaquette@apple.com>

[profiling] Improve error message for raw profile header mismatches

When a user uses a mismatched clang + llvm-profdata, they didn't get a very
informative error message. It would just say "unsuppor

[profiling] Improve error message for raw profile header mismatches

When a user uses a mismatched clang + llvm-profdata, they didn't get a very
informative error message. It would just say "unsupported version".

As a result, users are often confused as to what they are supposed to do and
tend to assume that it's a bug in the profiling runtime.

This patch improves the error message by:

- Adding a new class of error (`raw_profile_version_mismatch`) to make it clear
that, specifically, the *raw profile* version is unsupported because of a
tool mismatch.

- Adding an error message that tells the user which raw profile version was
encountered, which version was expected, and instructs them to align their
tool versions.

To support this, this patch also updates `InstrProfError::take` to also
propagate the optional error message.

Differential Revision: https://reviews.llvm.org/D149361

show more ...


Revision tags: llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3
# 072e07a9 17-Feb-2023 Daniel Thornburgh <dthorn@google.com>

[llvm-cov] Optionally fail on missing binary ID

This adds the --check-binary-id flag that makes sure that an object file
is available for every binary ID mentioned in the given profile. This
should

[llvm-cov] Optionally fail on missing binary ID

This adds the --check-binary-id flag that makes sure that an object file
is available for every binary ID mentioned in the given profile. This
should help make the tool more robust in CI environments where it's
expected that coverage mappings should be available for every object
contributing to the profile.

Reviewed By: gulfem

Differential Revision: https://reviews.llvm.org/D144308

show more ...


Revision tags: llvmorg-16.0.0-rc2
# 516e3017 01-Feb-2023 Steven Wu <stevenwu@apple.com>

[NFC][Profile] Access profile through VirtualFileSystem

Make the access to profile data going through virtual file system so the
inputs can be remapped. In the context of the caching, it can make su

[NFC][Profile] Access profile through VirtualFileSystem

Make the access to profile data going through virtual file system so the
inputs can be remapped. In the context of the caching, it can make sure
we capture the inputs and provided an immutable input as profile data.

Reviewed By: akyrtzi, benlangmuir

Differential Revision: https://reviews.llvm.org/D139052

show more ...


# 0a51eeda 30-Jan-2023 Daniel Thornburgh <dthorn@google.com>

[NFC] [llvm-cov] Remove unnecessary logic from llvm-cov debuginfod.

Indexed profiles already have a sorted and uniqued binary ID list, and
due to this, duplicates are harmless in the list of binary

[NFC] [llvm-cov] Remove unnecessary logic from llvm-cov debuginfod.

Indexed profiles already have a sorted and uniqued binary ID list, and
due to this, duplicates are harmless in the list of binary IDs found,
since it's set_differenced from the list in the indexed profile.

Differential Revision: https://reviews.llvm.org/D136702

show more ...


Revision tags: llvmorg-16.0.0-rc1
# 9977b65a 27-Jan-2023 Daniel Thornburgh <dthorn@google.com>

[llvm-cov] Fix logic error in debuginfod lookup.

Differential Revision: https://reviews.llvm.org/D136702


Revision tags: llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4
# a3b0dde4 24-Oct-2022 Daniel Thornburgh <dthorn@google.com>

Reland: [llvm-cov] Look up object files using debuginfod

Reviewed By: gulfem

Differential Revision: https://reviews.llvm.org/D136702


# bce91024 26-Jan-2023 Douglas Yung <douglas.yung@sony.com>

Revert "[llvm-cov] Look up object files using debuginfod"

This reverts commit efbc8bb18eda63007216ad0cb5a8de04963eddd5.

This change is causing failures when detecting curl on several build bots:
-

Revert "[llvm-cov] Look up object files using debuginfod"

This reverts commit efbc8bb18eda63007216ad0cb5a8de04963eddd5.

This change is causing failures when detecting curl on several build bots:
- https://lab.llvm.org/buildbot/#/builders/247/builds/884
- https://lab.llvm.org/buildbot/#/builders/231/builds/7688
- https://lab.llvm.org/buildbot/#/builders/121/builds/27389
- https://lab.llvm.org/buildbot/#/builders/230/builds/8464
- https://lab.llvm.org/buildbot/#/builders/57/builds/24209
- https://lab.llvm.org/buildbot/#/builders/127/builds/42722

show more ...


# d4e3a1dc 26-Jan-2023 Douglas Yung <douglas.yung@sony.com>

Revert "Fix compilation failure in CoverageMapping.cpp"

This reverts commit 46013fc10a6879f4c9b4c9b9fbd43e4dc70f3c8b.

The original commit efbc8bb18eda63007216ad0cb5a8de04963eddd5 is failing on seve

Revert "Fix compilation failure in CoverageMapping.cpp"

This reverts commit 46013fc10a6879f4c9b4c9b9fbd43e4dc70f3c8b.

The original commit efbc8bb18eda63007216ad0cb5a8de04963eddd5 is failing on several bots, so
reverting this follow-up commit as well as the original commit.

show more ...


# 46013fc1 25-Jan-2023 Daniel Thornburgh <dthorn@google.com>

Fix compilation failure in CoverageMapping.cpp


# efbc8bb1 24-Oct-2022 Daniel Thornburgh <dthorn@google.com>

[llvm-cov] Look up object files using debuginfod

Reviewed By: gulfem

Differential Revision: https://reviews.llvm.org/D136702


# b53e0d1b 14-Jan-2023 Kazu Hirata <kazu@google.com>

Use std::nullopt instead of None in comments (NFC)


# 4e0e0bbd 12-Dec-2022 Fangrui Song <i@maskray.me>

[ProfileData] llvm::Optional => std::optional


# f7dffc28 10-Dec-2022 Kazu Hirata <kazu@google.com>

Don't include None.h (NFC)

I've converted all known uses of None to std::nullopt, so we no longer
need to include None.h.

This is part of an effort to migrate from llvm::Optional to
std::optional:

Don't include None.h (NFC)

I've converted all known uses of None to std::nullopt, so we no longer
need to include None.h.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

show more ...


# 595f1a6a 05-Dec-2022 Kazu Hirata <kazu@google.com>

[llvm] Use std::nullopt instead of None in comments (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalu

[llvm] Use std::nullopt instead of None in comments (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

show more ...


# aadaafac 03-Dec-2022 Kazu Hirata <kazu@google.com>

[llvm] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the amount of ma

[llvm] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

show more ...


# e03868a4 26-Nov-2022 Kazu Hirata <kazu@google.com>

[Coverage] Use std::optional in CoverageMapping.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalu

[Coverage] Use std::optional in CoverageMapping.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

show more ...


Revision tags: llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init
# 4979b16d 21-Jul-2022 Zequan Wu <zequanwu@google.com>

[llvm-cov] Improve error message by printing the object file name that produces error

If error occurs on constructing coverage info for one of the object files, it prints the name of the object file

[llvm-cov] Improve error message by printing the object file name that produces error

If error occurs on constructing coverage info for one of the object files, it prints the name of the object file, so that users know which one is the cause of error.

Differential Revision: https://reviews.llvm.org/D130196

show more ...


# ede60037 29-Jun-2022 Nicolai Hähnle <nicolai.haehnle@amd.com>

ManagedStatic: remove many straightforward uses in llvm

(Reapply after revert in e9ce1a588030d8d4004f5d7e443afe46245e9a92 due to
Fuchsia test failures. Removed changes in lib/ExecutionEngine/ other

ManagedStatic: remove many straightforward uses in llvm

(Reapply after revert in e9ce1a588030d8d4004f5d7e443afe46245e9a92 due to
Fuchsia test failures. Removed changes in lib/ExecutionEngine/ other
than error categories, to be checked in more detail and reapplied
separately.)

Bulk remove many of the more trivial uses of ManagedStatic in the llvm
directory, either by defining a new getter function or, in many cases,
moving the static variable directly into the only function that uses it.

Differential Revision: https://reviews.llvm.org/D129120

show more ...


# e9ce1a58 10-Jul-2022 Nicolai Hähnle <nicolai.haehnle@amd.com>

Revert "ManagedStatic: remove many straightforward uses in llvm"

This reverts commit e6f1f062457c928c18a88c612f39d9e168f65a85.

Reverting due to a failure on the fuchsia-x86_64-linux buildbot.


# e6f1f062 29-Jun-2022 Nicolai Hähnle <nicolai.haehnle@amd.com>

ManagedStatic: remove many straightforward uses in llvm

Bulk remove many of the more trivial uses of ManagedStatic in the llvm
directory, either by defining a new getter function or, in many cases,

ManagedStatic: remove many straightforward uses in llvm

Bulk remove many of the more trivial uses of ManagedStatic in the llvm
directory, either by defining a new getter function or, in many cases,
moving the static variable directly into the only function that uses it.

Differential Revision: https://reviews.llvm.org/D129120

show more ...


Revision tags: llvmorg-14.0.6, llvmorg-14.0.5
# ce54b226 24-May-2022 Bruno Cardoso Lopes <bruno.cardoso@gmail.com>

[Clang][CoverageMapping] Fix switch counter codegen compile time explosion

C++ generated code with huge amount of switch cases chokes badly while emitting
coverage mapping, in our specific testcase

[Clang][CoverageMapping] Fix switch counter codegen compile time explosion

C++ generated code with huge amount of switch cases chokes badly while emitting
coverage mapping, in our specific testcase (~72k cases), it won't stop after hours.
After this change, the frontend job now finishes in 4.5s and shrinks down `@__covrec_`
by 288k when compared to disabling simplification altogether.

There's probably no good way to create a testcase for this, but it's easy to
reproduce, just add thousands of cases in the below switch, and build with
`-fprofile-instr-generate -fcoverage-mapping`.

```
enum type : int {
FEATURE_INVALID = 0,
FEATURE_A = 1,
...
};

const char *to_string(type e) {
switch (e) {
case type::FEATURE_INVALID: return "FEATURE_INVALID";
case type::FEATURE_A: return "FEATURE_A";}
...
}

```

Differential Revision: https://reviews.llvm.org/D126345

show more ...


Revision tags: llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1
# e4274cfe 03-May-2021 Pirama Arumuga Nainar <pirama@google.com>

[CoverageMapping] Handle gaps in counter IDs for source-based coverage

For source-based coverage, the frontend sets the counter IDs and the
constraints of counter IDs is not defined. For e.g., the

[CoverageMapping] Handle gaps in counter IDs for source-based coverage

For source-based coverage, the frontend sets the counter IDs and the
constraints of counter IDs is not defined. For e.g., the Rust frontend
until recently had a reserved counter #0
(https://github.com/rust-lang/rust/pull/83774). Rust coverage
instrumentation also creates counters on edges in addition to basic
blocks. Some functions may have more counters than regions.

This breaks an assumption in CoverageMapping.cpp where the number of
counters in a function is assumed to be bounded by the number of
regions:
Counts.assign(Record.MappingRegions.size(), 0);

This assumption causes CounterMappingContext::evaluate() to fail since
there are not enough counter values created in the above call to
`Counts.assign`. Consequently, some uncovered functions are not
reported in coverage reports.

This change walks a Function's CoverageMappingRecord to find the maximum
counter ID, and uses it to initialize the counter array when instrprof
records are missing for a function in sparse profiles.

Differential Revision: https://reviews.llvm.org/D101780

show more ...


# 8280ece0 09-Apr-2021 Petr Hosek <phosek@google.com>

[Coverage] Support overriding compilation directory

When making compilation relocatable, for example in distributed
compilation scenarios, we want to set compilation dir to a relative
value like `.`

[Coverage] Support overriding compilation directory

When making compilation relocatable, for example in distributed
compilation scenarios, we want to set compilation dir to a relative
value like `.` but this presents a problem when generating reports
because if the file path is relative as well, for example `..`, you
may end up writing files outside of the output directory.

This change introduces a flag that allows overriding the compilation
directory that's stored inside the profile with a different value that
is absolute.

Differential Revision: https://reviews.llvm.org/D100232

show more ...


123456