Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
7731 Discussions

Codecoverage for FlexRAN V21.03 for SDK

Purnachandra
Beginner
878 Views

Hi,

we are planning to calculate the code coverage for intel FlexRAN code v21.03 using the codecov tool provided by intel.

URL is appended below for your reference.

https://www.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-refer...

I have followed the above URL to get the code coverage for SDK but no luck.

Any support on this?

0 Kudos
8 Replies
Viet_H_Intel
Moderator
851 Views

Hi,

 

Here are steps:

 

1) Compile with -profgen=srcpos, you will see the pgopti.spi (static profile information) file gets generated (Note: if you have lot of source files under different directories, then you need to compile with both -profgen=srcpos -prof-dir /tmp/dir_you_want_all_profiled_data_to_reside, or set the ENV variable "export PROF_DIR= /tmp/some_dir"). This way, all your .spi, .dyn and dpi files will be under one place.

 

$ icc -prof-gen=srcpos temp.c 

$ ls -lt pgopti*

-rw-r--r-- 1 users 790 Oct 12 13:40 pgopti.spi

-rw-r--r-- 1 users  0 Oct 12 13:40 pgopti.spl

 

2) Then run your workloads to get dynamic information (.dyn)

$ ./a.out

 

$ ls -lt pgopti* *dyn

-rw-r--r-- 1 users 736 Oct 12 13:40 6165f2d1_23668.dyn

-rw-r--r-- 1 users 736 Oct 12 13:40 6165f2ca_23664.dyn

 

3) Use profmerge tool to merge all *dyn files into 1 pgopti.dpi (dynamic profiled information) file.

$ profmerge *dyn

$ ls -lt pgopti* 

-rw-r--r-- 1 users 1808 Oct 12 13:41 pgopti.dpi

 

4) use codecov [options] 

 

$ codecov -prj myProject -spi pgopti.spi -dpi pgopti.dpi

 

By default, the code coverage tool generates a single HTML file (CODE_COVERAGE.HTML) and a subdirectory (CodeCoverage) in the current directory. Use any web browser to see the coverages.

 

Let us know more details which issues you have encountered. 

 

 

Purnachandra
Beginner
529 Views

hi,
Thanks for your response. This is the general procedure to run codecov. But I am not able to get the .spi & .spl files for the SDK module which is provided by intel_FlexRAN_21.03.

Purnachandra
Beginner
517 Views

this same procedure in not provide the code coverage for SDK which is part of flex ran code(intel) for L1.

Viet_H_Intel
Moderator
689 Views

I assume that I've answered your questions. Thus, I am going to close this thread.

If you need more assistants from us, please create a new thread.


Thanks,



Viet_H_Intel
Moderator
512 Views

Hi,

You may need to contact the FlexRan team to see if they can provide you with that info or not, as this forum is only for Intel compiler usage/bugs.


Thanks,


Purnachandra
Beginner
489 Views

Thanks for the update. I will check with the flexRAN team. I have one more query regarding codecov. if you can address:
query:- Few of the files are missing under the same subdirectory while a few of them are coming in "pgopti.spi". what to do about this?
any pointer?

Regards,
Poorna

Viet_H_Intel
Moderator
481 Views

I would check to see if those files compiled with -profgen=srcpos.

Viet_H_Intel
Moderator
379 Views

Hi,


If there isn't any questions we would like to close this thread. Please let us know.


Thanks,


Reply