blob: 5c600ddcfd5b4ea14ef2d71746c9df37d3ae9f61 [file] [log] [blame] [view]
Basil Eljuse4b14afb2020-09-30 13:07:23 +01001# coverage-plugin User Guide
2
3The *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
16You 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
23You can then run your FVP model. The traces will be created at the end of the simulation*.
24
25BEWARE: 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)