Presentation is loading. Please wait.

Presentation is loading. Please wait.

Code Coverage David Inglis November 18, 2018.

Similar presentations


Presentation on theme: "Code Coverage David Inglis November 18, 2018."— Presentation transcript:

1 Code Coverage David Inglis November 18, 2018

2 QNX Confidential. All content copyright QNX Software Systems.
Code Coverage gcc produces all coverage data Type of Code Coverage Basic block coverage block of code defined as not having any branch point within. Branch Coverage (Path) tracking paths of execution between blocks. QNX Confidential. All content copyright QNX Software Systems.

3 QNX Confidential. All content copyright QNX Software Systems.
Code Coverage Compiler Options $(CC) –Wc,-fprofile-arcs –Wc,-ftest-coverage enables compiler instrumentation which counts execution of branches between basic blocks. $(LD) -p links in startup and shutdown code .da file generation shutdown code to write .da files for each source file. qconn connection program information on startup (obtains pointer to global structure). QNX Confidential. All content copyright QNX Software Systems.

4 QNX Confidential. All content copyright QNX Software Systems.
Code Coverage Compilation gcc produces 2 files when source if compiled <source_name>.bbg Used to reconstruct execution paths between basic block <source_name>.bb Used to map basic blocks to a line of code and function Execution Path execution counts are maintained in memory Not using IDE data is written to <source_name>.da files upon exit. Using IDE the data is read by qconn and returned to the IDE as process runs. QNX Confidential. All content copyright QNX Software Systems.

5 QNX Confidential. All content copyright QNX Software Systems.
Code Coverage IDE Coverage data presented and stored as a session Sessions can be combined If source is available can view line coverage with editor. If source is not available, or source code can’t be found due to path differences between build machine and IDE*, coverage metrics are still available. Reports can be viewed “online” or saved to a file. Easily imported into excel. QNX Confidential. All content copyright QNX Software Systems.


Download ppt "Code Coverage David Inglis November 18, 2018."

Similar presentations


Ads by Google