Skip to content
Snippets Groups Projects
Select Git revision
  • 595ed36aa7c43e0b32d4f077882454e33ee0f97c
  • master default
2 results

ptasktracer

ptaskTracer

Tracing tool for periodic and aperiodic real-time tasks of ptask API.

  • Version 1.0, February 2018

Introduction

ptaskTracer is a tool that traces the execution of periodic and aperiodic tasks created with the API ptask, analyses the traces, and generates a SVG of the scheduling of the threads. The tool uses :

  • LTTng, an open source software toolkit which can be used to trace the Linux kernel, user applications, and user libraries.
  • ANTLR4, a parser generator for reading, processing, executing, or translating structured text or binary files.
  • Batik, a Java-based toolkit for applications or applets that want to use SVG images format.

Requirements

Requirements of ptask

  • Allegro 4 libraries
  • CMake 3.1+

Requirements of the tool

  • Java
  • LTTng 2.10
  • ANTLR4
  • Batik and w3c libraries

Installation

To install Lttng 2.10, download ANTLR4 4.7.2, Batik 1.10 and w3c jar lib libraries, compile and install the tool, run (from the repository ):

$ sudo ./install.sh

On Ubuntu systems, add stable 2.10 PPA repository before :

$ sudo apt-add-repository ppa:lttng/stable-2.10
$ sudo apt-get update
$ sudo ./install.sh

Make sure lttng-tools, lttng-modules, and liblttng-ust are installed before running the application.

Execution

Create LTTng daemon session :

$ sudo lttng-sessiond --daemonize

Start the application :

$ sudo ptaskTracer -f|--file [APP_NAME] <-p|--path APP_PATH> <-t|--time TRACING_TIME> <-s|--scale PRINT_SCALE> <-h|--theight TASK_HEIGTH> <-os|--osapp> <-g|--group> <-o|--output OUTPUT>

or

$ sudo ptaskTracer --old -f|--file [APP_NAME] <-s|--scale PRINT_SCALE> <-h|--theight TASK_HEIGTH> <-os|--osapp> <-g|--group> <-i|--input INPUT>

With the option --old, no tracing is performed, the trace analysed will be INPUT/build/[APP_NAME]_raw.txt

For help, type :

$ ptaskTracer --help

These parameters are optional :

  • <-o|--output OUTPUT> to specifie directory where all output in build/ is generated
  • <-a|--arg ARGS> to specify arguments to the program
  • <-i|--input INPUT> to specifie directory of the old build/[APP_NAME]_raw.txt
  • <-t|--time TRACING_TIME> for tracing time in second, must be unsigned double (default: 4s)
  • <-s|--scale PRINT_SCALE> for printing scale, must be unsigned double (default: 1000.0px/s)
  • <-h|--theight TASK_HEIGTH> for printing task height in px, must be unsigned double (default: 20.0px)
  • <-os|--osapp> to trace system activity (default: false)
  • <-g|--group> to group tasks by cpu (default: false)