Code Coverage

The Intel Compiler Code-Coverage and Test-Priorization Tools are part of the Intel Commpiler suite. It is based on the Intel profile-guided optimization (PGO) technology and only available for Intel Compilers.

The routines have to be compiled with the -prof_gen or -profgenx option.
Note: This option adds considerable execution overhead (up to a factor of 10).

How to use codecov:

  1. compile with -prof_genx:
          ifort -prof_genx ....

    this will also produce the file with static profile information: pgopti.spi
    (as only one file ist produced, parallel compilation with make -j is NOT possible)
  2. run the application with typical input sets: 
              a.out < data1
          a.out < data2
  3. merge the generated .dyn files into one (.dpi) file:
              profmerge
  4. Help about codecov and its options:
              codecov -help
  5. Run The Code Coverage Tool:
              codecov [-counts]
  6. View the HTML pages with browser:
              firefox CODE_COVERAGE.HTML

Details: