Basil Eljuse | 4b14afb | 2020-09-30 13:07:23 +0100 | [diff] [blame] | 1 | # coverage-plugin User Guide |
| 2 | |
| 3 | The *coverage-plugin* is a C++ project using the Model Trace Interface Plugin Development Kit (MTIPDK) in order to create a trace plugin, which is a special shared library. The trace plugins can be loaded into Arm Fast Models to produce execution trace data for doing code coverage measurement. |
| 4 | |
| 5 | ## Dependencies |
| 6 | - GCC 7.5.0 at least |
| 7 | |
| 8 | ## Building the coverage-plugin |
| 9 | ```bash |
| 10 | $ cd coverage-plugin |
| 11 | $ make PVLIB_HOME=</path/to/model_library> |
| 12 | ``` |
| 13 | |
| 14 | ## Capturing a trace |
| 15 | |
| 16 | You need to add two options to your model command-line: |
| 17 | |
| 18 | ```bash |
| 19 | --plugin /path/to/coverage_trace.so |
| 20 | -C TRACE.coverage_trace.trace-file-prefix="/path/to/TRACE-PREFIX" |
| 21 | ``` |
| 22 | |
| 23 | You can then run your FVP model. The traces will be created at the end of the simulation*. |
| 24 | |
| 25 | BEWARE: Traces aren't numbered and will be overwritten if you do two successive runs. Aggregating results will require moving traces to a separate place or changing the prefix between runs. This is the responsibility of the plugin user. |
| 26 | |
| 27 | *NOTE: The plugin captures the traces in memory and on the termination of the simulation it writes the data to a file. If user terminates the simulation forcefully with a Ctrl+C the trace files are not generated. |
| 28 | |
| 29 | ## License |
| 30 | [BSD-3-Clause](../../license.md) |