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

Codecoverage for FlexRAN V21.03 for SDK

Purnachandra
Beginner
1,482 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-reference/top/optimization-and-programming-guide/tools/pgo-tools/code-coverage-tool.html

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
1,455 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. 

 

 

0 Kudos
Purnachandra
Beginner
1,133 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.

0 Kudos
Purnachandra
Beginner
1,121 Views

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

0 Kudos
Viet_H_Intel
Moderator
1,293 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,



0 Kudos
Viet_H_Intel
Moderator
1,116 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,


0 Kudos
Purnachandra
Beginner
1,093 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

0 Kudos
Viet_H_Intel
Moderator
1,085 Views

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

0 Kudos
Viet_H_Intel
Moderator
983 Views

Hi,


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


Thanks,


0 Kudos
Reply