Trace-based Code Coverage


The embedded tools company


Picture
  Highlights
Real-time code coverage without instrumentation
Suitable for long-term testing
Analysis for both assembly and source code level
Off-line review capabilities
Full support of multicore chips


Link Support
Technical Support
Tutorials: Get more information and watch our live-recordings about Code Coverage (ARM Expert Day 2013 and Automotive Forum 2013)!




TOP

Introduction


    The main application of code coverage analysis is to indicate which parts of a software application have been stressed by testing and which have not. Especially in the context of safety critical development, code coverage is heavily used to minimize the risk that undetected errors threaten the overall system safety.

    Using the data provided by an on-chip trace logic, TRACE32 supports long-term trace-based code coverage analysis during testing of highly-optimized code on the real target hardware. This method neither relies on code instrumentation nor affects the runtime behavior of the chip. For compliance with common safety standards, proof of statement, decision and modified condition/decision coverage for multicore chips can be achieved with TRACE32.
TOP

Recording


    A TRACE32 Debug & Trace Tool has to be connected to the chip in order to be able to record the trace information.



    The trace logic of the chip generates information about the execution of instructions for each individual core. A parallel or serial off-chip trace port with high bandwidth is required to transfer the trace information in the trace memory of the TRACE32 Debug & Trace Tool. Although the size of the trace buffer is currently limited by 4GB, any restriction of the recording time can be avoided by use of Streaming. During Streaming the trace information is buffered into the trace memory only for a short amount of time before it is streamed to a file on the host computer. The processing of the code coverage data is started simultaneously with the recording, so that an analysis of the preliminary data may be carried out at any time.

TOP

Merge


    TRACE32 takes the partitioning of modular tests into account by providing a flexible merge functionality: Code coverage data of previously carried out test subsets can be combined with current data to achieve a complete coverage analysis.


TOP

Review


    TRACE32 PowerView, which is running on the host computer, is used to display the results of the analysis. Various overviews are available that summarize the coverage for modules, functions and source code lines for fast review of the results.



    Coverage is displayed for both assembly and source code level. To verify the coverage of a source code line, the coverage of all associated assembly statements is monitored. This approach assures that not only those statements directly traceable from source code are subject to the analysis.



    All Code parts that have not been fully covered are marked and visually highlighted.
TOP

Comment


    There are a number of reasons for the occurence of gaps in the coverage that have to be addressed after test completion. Dead code is not acceptable and has to be removed after detection, whereas e.g. deactivated code that is dependent on the currently active system configuration is permitted.



    TRACE32 allows easy handling of code segments which require special attention. Lines may be supplemented by additional comments which can also be used to navigate quickly to the respective location.

TOP

Export


    After completion of the analysis all results are available for export to carry out postprocessing, off-line reviews or the coupling of TRACE32 with a third-party toolchain.



    An XSLT stylesheet is provided that may be used to format or filter the exported code coverage data.





Copyright © 2016 Lauterbach GmbH, Altlaufstr.40, D-85635 Höhenkirchen-Siegertsbrunn, Germany  Impressum
The information presented is intended to give overview information only.
Changes and technical enhancements or modifications can be made without notice. Report Errors
Last generated/modified: 28-Jan-2016