From: Peter O. <obe...@us...> - 2013-12-13 15:10:00
|
Update of /cvsroot/ltp/utils/analysis/lcov/man In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv26346/man Modified Files: geninfo.1 Log Message: geninfo: add exclude marker for branch coverage Sometimes it can be helpful to generally use branch coverage but to disable it for some lines of code without excluding the line or function coverage too. For example if you make heavily use of assertions in your code (which is generally a good idea) you will see that for each 'assert(...)' exist one branch which is taken and one that is not. Similarly you can see the same phenomenon for 'delete' in C++ code. If you use the 'LCOV_EXCL_LINE' marker in such a situation both of these branches will be omitted from the output. But in doing so, you loose the ability to determine if this peace of code is genuine 'dead code' or not because the line coverage is omitted too. The newly introduces 'LCOV_EXCL_BR_LINE', 'LCOV_EXCL_BR_START' and 'LCOV_EXCL_BR_STOP' marker address this problem. The usage is similar to the 'LCOV_EXCL_LINE' etc. markers. Signed-off-by: Sebastian Stigler <s_s...@gm...> Index: geninfo.1 =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/man/geninfo.1,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** geninfo.1 10 Oct 2012 08:20:21 -0000 1.25 --- geninfo.1 13 Dec 2013 15:09:58 -0000 1.26 *************** *** 75,80 **** To exclude specific lines of code from a tracefile, you can add exclusion ! markers to the source code. Exclusion markers are keywords which can for ! example be added in the form of a comment. The following markers are recognized by geninfo: --- 75,82 ---- To exclude specific lines of code from a tracefile, you can add exclusion ! markers to the source code. Additionally you can exclude specific branches from ! branch coverage without excluding the involved lines from line and function ! coverage. Exclusion markers are keywords which can for example be added in the ! form of a comment. The following markers are recognized by geninfo: *************** *** 97,100 **** --- 99,119 ---- .RE .br + LCOV_EXCL_BR_LINE + .RS + Lines containing this marker will be excluded from branch coverage. + .br + .RE + LCOV_EXCL_BR_START + .RS + Marks the beginning of a section which is excluded from branch coverage. The + current line is part of this section. + .br + .RE + LCOV_EXCL_BR_STOP + .RS + Marks the end of a section which is excluded from branch coverage. The current + line not part of this section. + .RE + .br .SH OPTIONS |