Notice: We have migrated to GitLab launching 2024-05-01 see here:

Changes between Version 1 and Version 2 of Developer/Tracing

03/15/15 05:42:17 (9 years ago)
Chris Johns

Add CTF workflow.


  • Developer/Tracing

    v1 v2  
    2424The RTEMS Trace Linker can be configured to generate other trace output and can be used to generate custom logs for any specific purpose. For example you could create a trace log that is just an Id and timestamp so you can get a profile of the performance of you code.
     26== RTEMS Trace Using CTF ==
     28''Note: CTF support is still under development''
     30RTEMS Trace can generate the Common Trace Format (CTF) files.
     32[[Image(rtems-trace.png, 40%, align=center)]]
     34The work flow is:
     36 [1]:: The user creates an RTEMS application in the normal manner as well as a Trace Linker configuration file. The configuration file specifies using the CTF trace mdre, the functions to trace, and the default trace enable and trigger configuration the Capture Engine uses. The user invokes the Trace Linker with the configuration and the normal link command line used to the link the application executable. The application ELF object files and libraries, including the RTEMS libraries are standard and do not need to be built specially.
     38 [2]:: The RTEMS Trace Linker reads the user's configuration file and that results in it reading the standard CTF Trace Configuration files installed with the RTEMS Trace Linker. The trace linker uses the target compiler and linker to create the trace enabled application execuable. It wraps the functions defined in the user's configuration with code that generates trace records for the Capture Engine. Each trace record is given an identifier that is used to decode the trace data. The trace wrapper code is compiled with the target compiler and the resulting ELF object file is added to the standard link command line used to link the application and the application is relinked using the wrapping option of the GNU linker.
     40 [3]:: The trace linker creates and RTEMS ELF executable that can be run on the target hardware or simulator. It also creates a CTF configuration file defining the trace records and the format of the trace records.
     42 [4]:: The user runs the application in the GNU debugger and loads the RTEMS Tools Project's Python support code. This code contains support to manage the capture engine and extract the data from the target writing it into a trace data file. The control and data extraction is not real-time, that is the application is stopped and the data extracted.
     44 [5]:: The RTEMS Trace data and the CTF configuration is passed to Babletrace where it is converted to a CTF format data file. CTF data files can be viewed with a range of visualisation tools.