Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor III
79 Views

Intel code coverage tool and preprocessing code setions

Jump to solution

Does the Intel code coverage tool exclude the irrelevant preprocessing sections of a Fortran code from the final computation of the coverage percentage?

My feeling is that it apparently does not exclude the irrelevant sections from the current preprocessing compilation settings. If so, the coverage stats will falsely indicate a lack of coverage, while the code might be 100% covered for that particular preprocessing settings.

0 Kudos

Accepted Solutions
Highlighted
Black Belt Retired Employee
55 Views

I misunderstood your saying "preprocessing". Code coverage is based on generated code from the compilation phase. Preprocessing just modifies the source that the compiler sees. 

Information on excluding sections from coverage is here.

View solution in original post

3 Replies
Highlighted
Black Belt Retired Employee
74 Views

The code coverage tool has no idea what is "irrelevant". But I would expect that entry and exit code would always be executed. There is the ability to exclude selected portions of your code from analysis.

Highlighted
New Contributor III
68 Views

Thanks Steve. My impression was that the tool would be able to infer the relevant parts of a file that requires preprocessing. and in my mind, that would be done by preprocessing the file first and then passing it to the code coverage tool for analysis. I am not sure if this is really being done by the Intel codecov.

Regarding your response, could provide some keyword hints on how to exclude certain parts of the code?

0 Kudos
Highlighted
Black Belt Retired Employee
56 Views

I misunderstood your saying "preprocessing". Code coverage is based on generated code from the compilation phase. Preprocessing just modifies the source that the compiler sees. 

Information on excluding sections from coverage is here.

View solution in original post