forked from OSchip/llvm-project
[docs] Add a limitations section to SourceBasedCodeCoverage.rst
llvm-svn: 271544
This commit is contained in:
parent
93c99cf059
commit
553a0d62f2
|
@ -165,7 +165,7 @@ A few final notes:
|
||||||
indexed profiles. To combine profiling data from multiple runs of a program,
|
indexed profiles. To combine profiling data from multiple runs of a program,
|
||||||
try e.g:
|
try e.g:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
% llvm-profdata merge -sparse foo1.profraw foo2.profdata -o foo3.profdata
|
% llvm-profdata merge -sparse foo1.profraw foo2.profdata -o foo3.profdata
|
||||||
|
|
||||||
|
@ -184,3 +184,20 @@ Format compatibility guarantees
|
||||||
* There is a third format in play: the format of the coverage mappings emitted
|
* There is a third format in play: the format of the coverage mappings emitted
|
||||||
into instrumented binaries. Tools must retain **backwards** compatibility
|
into instrumented binaries. Tools must retain **backwards** compatibility
|
||||||
with these formats. These formats are not forwards-compatible.
|
with these formats. These formats are not forwards-compatible.
|
||||||
|
|
||||||
|
Drawbacks and limitations
|
||||||
|
=========================
|
||||||
|
|
||||||
|
* Code coverage does not handle stack unwinding in the presence of uncaught
|
||||||
|
exceptions precisely. Consider the following function:
|
||||||
|
|
||||||
|
.. code-block:: cpp
|
||||||
|
|
||||||
|
int f() {
|
||||||
|
may_throw();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
If the function ``may_throw()`` propagates an exception into ``f``, the code
|
||||||
|
coverage tool may mark the ``return`` statement as executed even though it is
|
||||||
|
not.
|
||||||
|
|
Loading…
Reference in New Issue