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

Flushing Code Coverage data to disk

Roberto_D_
Beginner
348 Views

Hi all,

We have experienced a problem when collecting code coverage data on top of a a batch of tests.

We need to have code coverage data associated with each single test in the batch, not just the overall the code coverage data of the whole batch of tests, so before performing each test in the batch we delete all old dyn files, and after each test in the batch we group together all dyn files using the profmerge command.

The application we are testing is a process  that is loaded before the batch of tests is executed and would normally stay up after the batch of tests completes.

Unfortunately we have noticed that some profiling files (*.dyn), generated at run time, are not created until the application process ends.
This causes us to report wrong results, as at the time of grouping *.dyn files associated with a given test we have some functions indeed performed by the test but reported as not covered, or could result in associating the wrong test with certain coverage data.

Is there a way to force flushing pending data to disk, in order to ensure all *.dyn files written to disk at the time of profmerge between each test?

Some details of my environment are:
Intel suite v13.
SUSE Enterprise Server 10 operating system.
Compiler option used is -prof-gen.

Thanks.

0 Kudos
3 Replies
Max_G_
Beginner
348 Views

I work with Roberto, and from a better look at the Compiler reference guide we found out that there are APIs allowing to dump the dynamic profiling information for non terminating processes, so we can successfully dump the info using the _PGOPTI_Prof_Dump_And_Reset() API.

We still have a issue though, according to the documentation of the compiler here:

http://software.intel.com/sites/products/documentation/doclib/iss/2013/compiler/cpp-lin/GUID-20D09B15-2378-4275-9F99-A9AA68F79991.htm

It should be also possible to set a dumping interval, but that does not work properly, ie if one tries out the example provided above with _PGOPTI_Set_Interval_Prof_Dump(5000); instead of getting a dump every 5 seconds we get a continuous dump at every function call which fills up the proof dir with tons of *.dyn files. The same behavior of continuous *.dyn dump occurs if we try to set the corresponding env variable like:

export INTEL_PROF_DUMP_INTERVAL=5000

Can someone from Intel provide help on this?

Thanks,

Max

0 Kudos
jimdempseyatthecove
Honored Contributor III
348 Views

Have you tried setting the environment variable INTEL_PROF_DUMP_INTERVAL=5000
(and not setting INTEL_PROF_DUMP_CUMULATIVE)

Jim Dempsey

0 Kudos
Max_G_
Beginner
348 Views

Yes that is what we tried. We did not set INTEL_PROF_DUMP_CUMULATIVE just INTEL_PROF_DUMP_INTERVAL.

Thanks,

Max

0 Kudos
Reply