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

Using Intel C++ Composer XE 2011 -> Code Coverage

Daniel_D
Beginner
347 Views

I have a question concerning the Intel Code Coverage. It passes successfully both steps of the Intel Code Coverage analysis within VS 2010.

Phase 1: Instrument for Code Coverage
Phase2: Run Instrumented Application

If the application terminates after phase 2 nothing special happens. I expected some kind of statistics or analysis. But everything looks like a regular run. I have also search the documentation for more information on how to use this function. But I could not find anything that helps. Also I have not found any analysis file in the project folder.

Daniel
0 Kudos
4 Replies
Hubert_H_Intel
Employee
347 Views
Daniel,
I recently encountered the same and I'm investigating.
Regards, Hubert.
0 Kudos
Daniel_D
Beginner
347 Views
Hi Hubert,

I'm not sure if that is good or bad :)..... but I am happy that you are looking into this issue..

Daniel
0 Kudos
Hubert_H_Intel
Employee
347 Views

Daniel,

Code Coverage is not fully implemented in the Intel Composer XE integration for Visual Studio. You can instrument code and run instrumented code only from the IDE. But then you need to merge the results from the static and dynamic profiling using the tool 'profmerge' and then create your Code Coverage result using the tool 'codecov'.

So after having instrumented and run the code (via right-click on the project > Intel C++ Composer XE 2011 > Code Coverage Opterations > Phase 1: .... and then Phase 2: ....) you need to go to the working directory (starting from the directory where you start your .sln file: \\\\) where you can find the .dyn, .SPI and .SPL files created from Phases 1 + 2. You need to merge them as follows:

> profmerge

and create your CC results

> codecov

A top-level CODE_COVERAGE.HTML file together with the CodeCoverage subdirectory is being created showing the Code Coverage results.

Please refer to the documentation (from the Visual Studio Help menu > Intel C++ Composer XE 2011 > Intel C++ Composer XE Help > and search for 'code coverage Tool' to get more information.

Does this help?

Hubert.

0 Kudos
Daniel_D
Beginner
347 Views
Hi Hubert,

Thanks for your efforts. I will check that later and let you know if that works. Are there any plans to integrate that into the IDE to make this handling easier in the future?

Daniel
0 Kudos
Reply