Skip to content

vortexmakes/TrazerTC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrazerTC

Trace Compass Examples for RKH's Trazer

Contents


Overview

This repository provides a simple guide to use the powerful Trace Compass to solve performance and reliability issues by reading and analyzing traces of a reactive and embedded application based on the RKH framework.

Trace Compass is an open source application for viewing and analyzing any type of logs or traces. Its goal is to provide views, graphs, metrics, etc. to help extract useful information from traces, in a way that is more user-friendly and informative than huge text dumps.

Trace Compass parsing Trazer ouput

Trace Compass allows you not only to efficiently search and filter events but also to define your own trace analysis and a way to view them in an XML format. The data generated by the analysis could be used to populate time graph and XY chart views. A time graph view is a view divided in two, with a tree viewer on the left showing information on the different entries to display and a Gantt-like viewer on the right, showing the state of the entries over time. Whereas an XY chart displays series as a set of numerical values over time. The X-axis represents the time and is synchronized with the trace's current time range. The Y-axis can be any numerical value.

The following image shows an example of XY chart, whose Y-axis is a numerical value of a specific trace event (DEVMGR_BACKOFF_USR_TRACE). The trace used, as well as the XML file are available in analysis/backoff-analysis.xml and samples/trazer-backoff respectively. This event has a format like that:

1596475478| [190] | USR | DEVMGR_BACKOFF_USR_TRACE : User trace information
                                  | 00002

Trace Compass data analisys

Trace Compass Documentation

Before to start

To go through this tutorial, you will need:

  • A recent version of Trace Compass together with an Eclipse IDE. You will need a Java JRE, at least version 7.
  • A local clone of this repository
  • A recent version of Trazer which is a console application to capture and format traces from an instrumented application based on RKH

Installing Trazer

RKH allows developers to verify and validate a reactive application's behaviour at runtime by means of its built-in tracer. In addition, RKH provides a very simple but powerful console application, called Trazer, to visualize the trace events' output in a legible manner. It can be downloaded and installed as follows.

  1. Download Trazer for Linux 64-bits from its official repository
  2. Copy downloaded file to a folder and extract it
  3. Change the directory to previous folder
  4. Check it is alright by executing ./trazer

Using Trace Compass with Trazer

  1. Capture a trace session of your reactive embedded application
    1. Run Trazer from a terminal typing a sentence like that: ./trazer -c /dev/ttyS0 115200 8N1 -o outtraces to capture traces from a serial port and to save them to a file
    2. Run your embedded instrumented application which uses the RKH framework
  2. Run an Eclipse IDE instance
  3. Open Tracing perspective from Window > Perspective > Open Perspective and select Tracing
  4. Import TrazerTC project and open the Project Explorer view
  5. Importing Trazer parser
    1. Select Manage Custom Parsers... from the Traces folder context menu
    2. Click the Import... button and select a file from the opened file dialog to import the custom parser, in this case parsers/trazer-parser.xml file
  6. Open a trace file generated by the first step of this guide, right-click on Traces folder and select Open Trace...
  7. Importing XML file containing analyses
    1. Select Manage XML Analyses... from the Traces folder context menu
    2. Click the Import button and select a file from the opened file dialog to import an XML file containing an analysis, in this case from analysis folder. The file will be validated before importing it and if successful, the new file will be enabled and its analyses and views will be shown under the traces for which they apply.
  8. Opening a trace using Trazer parser
    1. Select a trace in the Project Explorer view
    2. Right-click the trace and select Select Trace Type... > Trazer > Parser
    3. Double-click the trace or right-click it and select Open. The trace will be opened in an editor showing the events table, and an entry will be added for it in the Time Chart view
  9. Importing trace filters
    1. Open Filters view
    2. Click Import filters button and select a file from the opened file dialog to import an XML file containing trace filters, in this case from filters folder.

Updating a XML analysis

If there are corrections to make, you may modify the XML state provider (trace data analysis) file, and re-import it. To re-run the analysis:

  1. Select a trace in the Project Explorer view
  2. Right-click the selected trace and select Delete supplementary files... and then click the OK button. The supplementary file deletion will have closed the trace, so it needs to be opened again to use the newly imported analysis file

Updating Trazer parser

  1. Open the Project Explorer view.
  2. Select Manage Custom Parsers... from the Traces folder context menu, or from a trace's Select Trace Type... context sub-menu.
  3. Select Trazer parser from the list and click the Edit... button to launch the Edit Custom Parser wizard.
  4. Once parser has been edited, export it. To do that, select Trazer parser from the list, click the Export... button and enter or select a file in the opened file dialog to export the Trazer parser. Note that if an existing file containing custom parsers is selected, the custom parser will be appended to the file.

Releases

No releases published

Packages

No packages published