File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -669,6 +669,25 @@ Guarded expression coverage is only available for the Ada language.
669
669
For implementation reasons, it is only available starting from version 2022 of
670
670
the language.
671
671
672
+ .. _instr-opti :
673
+
674
+ Optimizing the execution of instrumented programs
675
+ =================================================
676
+
677
+ To monitor the execution of statement obligations, gnatcov instruments the code
678
+ which results in an execution overhead.
679
+
680
+ To mitigate the performance impact, one can use the
681
+ :cmd-option: `--instrument-block switch `. Instead of instrumenting for the
682
+ execution of one statement, gnatcov instrument the code for the execution of a
683
+ block of statements, greatly reducing the execution overhead. The coverage
684
+ report is left unchanged, only the way coverage obligation are discarded is.
685
+
686
+ It is important to note that this could result in *false negatives * (i.e.
687
+ covered code reported as uncovered) when exceptions are used as a control flow
688
+ mechanism, and do not necessarily signal an abnormal termination of the program.
689
+ The tool will never report false positives (uncovered code reported as covered).
690
+
672
691
.. _instr-build :
673
692
674
693
Building instrumented components
You can’t perform that action at this time.
0 commit comments