Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

suppressing standard library calls in codecov

alin
Beginner
349 Views
Hello,

I'm trying to use the codecov tool that comes with the Intel C++ compiler. I can run it just fine with my software, but it also includes standard library calls in the profiling. Is there a way to prevent the standard library calls from being included in the results?

Thanks,
Andy
0 Kudos
1 Reply
Mohammad_H_Intel
Employee
349 Views
Hi Andy,
You can use the -comp option of codecov to include or exclude files or directories in covergae analysis. For example, if you put the following line in a text file, comp.txt:
/dev/src
and run "codecov -comp comp.txt", then only files who have a substring in their full path name that matches "/dev/src" will be included in coverage analysis. Of course, all files under /dev/src will be included. That's all you need. Now, if you want to exclude certain file or directory (e.g., file xyz.c in dir1) from this list, you add the following lines in the component file, comp.txt:
/dev/src/
~/dev/src/dir1/xyz.c
The exclude option is supported only in the latest version of the tool.
This option allows users to breakdown the coverage into several components, where each component is owned by a different organization and thus responsible for its coverage. You just need to have the total coverage file pgopti.spi, pgopti.dpi and the component files thatdescribe the components, as described above. Note that files or directories may be shared between components.
The white paper on Intel compiler code-coverage tool describes several options of the tool:
Please let us know if you need any more information.
Thanks,
- mo
0 Kudos
Reply