wiki:GSoC/2018/EnhancementRuntimeTracing

Version 4 (modified by Vidushi Vashishth, on May 9, 2018 at 4:50:13 AM) (diff)

--

Enhancement of RTEMS runtime tracing

Contents

  1. Enhancement of RTEMS runtime tracing
  2. Introduction
  3. Project Goal
  4. Tasks
    1. CTF
    2. Barectf
  5. Blog
  6. References

Students: Vidushi Vashishth

Mentors: Gedare Bloom, Chris Johns, Sebastian Huber

Introduction

RTEMS tracing is an on-target software system which enables monitoring activities in user applications, 3rd party packages or the Kernel in real time. The tracing system can be a useful aid in identifying complex threading, resolving deadlocks or other real time issues in RTEMS application. It can be helpful in analysing the performance of the applications too.

The tracing system currently comprises of the following components: 1) RTEMS Trace Linker 2) Capture Engine 3) Common Trace Format (CTF) integration

Project Goal

The aim of this project is threefold:

1) Combining CTF with rtems-tld tool: Currently CTF data is generated using the Babletrace tool. The Trace Linker uses the ELF file of the application to be traced and the user configuration file as input. It wraps functions declared in the configuration files with trace code that is used in generation of trace records for the capture engine. The linker generates the compiled file (ELF) to be run on the target and the associated CTF configuration file defining the trace records. The trace data and CTF configuration are then fed into the Babeltrace tool which converts it into CTF format. This output can be visualised using tools like Trace compass.

2) Transport mechanism for trace buffers (to the capture engine): There have been previous attempts to integrate such a transport mechanism in the capture engine. These are not viable. Data gathering and transfer should occur on different threads. As a start I am exploring writing to qemu fat file and file transfer protocol

3) Live tracing vs Kernel level tracing: Come up with design plans for both functionalities and implement the feature which is more relevant and impactful. A blog post regarding same is under development.

Tasks

CTF

Document the procedure of setting up Common Trace Format Infrastructure. Describe a babeltrace conversion formula from custom format to the CTF, with sufficient examples.Task1

Barectf

Enhance barectf to provide support for compound data structures such as arrays and structs. Provide stdint.h header file alternative for native C libraries which do not support this header file. Task2

Blog

The blog is currently under development and will document the progress on the aforementioned tasks.

References

https://devel.rtems.org/wiki/Developer/Tracing

https://devel.rtems.org/wiki/Developer/Tracing/Trace_Linker

https://devel.rtems.org/wiki/TBR/UserManual/Capture_Engine