= Enhancement of RTEMS runtime tracing = [[PageOutline(1-3, Contents, inline)]] '''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 project was majorly inspired from this [https://devel.rtems.org/ticket/3028 ticket]. The aim of this project is threefold: 1) Combining CTF with rtems-tld tool: Currently CTF data is generated using the [https://www.efficios.com/babeltrace/ 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 == 1) Document the procedure of setting up Common Trace Format Infrastructure. Describe a babeltrace conversion formula from custom format to the CTF, with sufficient examples.[https://devel.rtems.org/ticket/3426#ticket Task1] == Barectf == 1) Enhance barectf to provide support for compound data structures such as arrays and structs. This would require reading up barectf and ctf documentations and getting familiar with their code bases. [https://devel.rtems.org/ticket/3427#ticket Task2] 2) After this is done the next task will be to create a rtems-tld generator which generates C code that binds to the brectf calls. = Blog = The [https://vidushivashishth.github.io/ 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]