SLAU132V October 2004 – February 2020
In this phase, the compiler is invoked with the --use_profile_info=file.prf option, which indicates that the compiler should read the specified PRF file generated in phase 1. The application must also be compiled with either the --codecov or --onlycodecov option; the compiler generates a code-coverage info file. The --codecov option directs the compiler to continue compilation after generating code-coverage information, while the --onlycodecov option stops the compiler after generating code-coverage data. For example:
cl430 --opt_level=2 --use_profile_info=pprofout.prf --onlycodecov foo.c
You can specify two environment variables to control the destination of the code-coverage information file.
If the code-coverage data file already exists, the compiler appends the new dataset at the end of the file.
Code-coverage data is a comma-separated list of data items that can be conveniently handled by data-processing tools and scripting languages. The following is the format of code-coverage data:
"filename-with-full-path","funcname",line#,column#,exec-frequency,"comments"
"filename-with-full-path" | Full pathname of the file corresponding to the entry |
"funcname" | Name of the function |
line# | Line number of the source line corresponding to frequency data |
column# | Column number of the source line |
exec-frequency | Execution frequency of the line |
"comments" | Intermediate-level representation of the source-code generated by the parser |
The full filename, function name, and comments appear within quotation marks ("). For example: "/some_dir/zlib/msp430/deflate.c","_deflateInit2_",216,5,1,"( strm->zalloc )"
Other tools, such as a spreadsheet program, can be used to format and view the code coverage data. |