All Manuals > LispWorks User Guide and Reference Manual > 10 Code Coverage

NextPrevUpTopContentsIndex

10.5 Counting overflow

The code coverage counters are 32-bit signed values (signed to allow negative values, which you can get when subtracting). Long tests can overflow in their frequently-called functions. That means that for these functions the counter is not that useful anymore. Also, you can end up on exactly 0, which looks as if the code was not executed. For heuristics that seems not to be a problem.

To avoid these problems with counter overflow, you can compile with a binary flag (initial value 0) instead of the counter. The flag switches to 1 when the code is called (see generate-code-coverage and with-code-coverage-generation). This loses the counting, but also generates smaller and faster code and uses less memory.


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex