wiki:GSoC/2008/RunTimeTracing

Version 6 (modified by Alanz, on Jul 10, 2008 at 12:26:11 AM) (diff)

/* Add Weekly Update as Email communication*/

SOC RunTime? Tracing

Project Description

Run-Time Tracing is to log the behavior of RTEMS during runtime, for analysis purpose, or dynamic debugging purpose, enabling RTEMS user to monitor the flow of RTEMS applications and to help users determine what is going on inside their multithreaded programs. It might help debug RTEMS services but it is an application tool.

Currently RTEMS has capture engine available, it only hooks RTEMS user extension and trace those events including Task creation, Task initiation, Task reinitiation, Task deletion, Task context switch, Post task context switch, Task begin, Task exits, Fatal error detection. That is introduced firstly to test the performance impact by introducing the filter, the triggering, and storage of events.

The project is to introduce function tracing point without changing any code in the libraries to be traced, and to enable user to have user tracing point.

Mentor

Chris Johns

Status

High Level Design

Current focus is, besides the details in proposal, figure out additional scenario such as returning values by pointer arguments, which should be taken into consideration.

Weekly Update

  • 04/23/2008 - Clean up items to complete the spring semester, set up RTEMS 4.9 development environment running in the laptop.
  • 05/02/2008 - Got basic idea of RTEMS knowledge by training.
  • 05/09/2008 - Got code from Chris to extract function signature, look thru the code to be prepared for code change. Have a basic idea how Python works. Drafting high level design, to be available for review by next weekend.
  • 05/20/2008 - High Level Design is available for review.
  • 06/02/2008 - Follow up with "Bug 6483 objdump -g does not understand the debug info"
  • 06/03/2008 - Figure out the issue to compile my program, which kill lots of time over 1 week, summary is added to Quick Start.
  • 06/09/2008 - Have basics working for
    • 1. typedef will be generated if required to make wrap file self-contained, to avoid the scenario that the RTEMS header file included does not match with the type information in binary which may make debugging very difficult in field.
    • 2. real and wrap function prototype are generated.
    • 3. All arguments are printed both at the entry and exit of wrap function, the code to handle with pointer to structure is not in place yet.
    • 4. invocation of real function is in place, the '*' is removed from the pointer argument.
    • 5. if function return non void, return value of real one is also returned by wrap one.
  • 06/15/2008 - Fix bug in handling of anonymous renaming.
  • 06/23/2008 - There are many scenario to handle with for anonymous renaming, all fixed.
  • 06/25/2008 - Run QEMU in stdio successfuly to log output of program.
  • 06/25/2008 - Enhance the basics as following:
    • 1. extract function signature by objdump
    • 2. extract typedef and struct/union by objdump, anon rename job FINISHED, recursive anon is considered.
    • 3. log all arguments in both entry and exit, including recursive struct.
    • 4. The log function is simply to print to console, while it will soon be changed to transfer log to host.
    • 5. The isTriggered function simply return true now, while I plan to add trigger setting function in current capture engine, together with new isTriggered function. The isTriggered function will check whether the function is in the trigger list, like "filter rtems_semaphore_* from 32"
  • 07/02/2008 - Draft CLI in capture engine to integrate the tracing feature with Capture Engine.
  • 07/03/2008 - Upload code into Google Code site, and give a tarball to Chris for review.
  • 07/09/2008 - Draft the code to transfer log to host.
    • the buffer is designed to be fixed to avoid memory overuse in case high traffic.
    • In the meantime, specified numbers of task are designed to improve the throughput of logs to avoid log discard in case high traffic.

Project Schedule

  • Investigation and High Level Design ( Now - May 25 )
  • Section 3.1.1 – Section 3.1.3 ( May 26 – Jun 2 )
  • Section 3.1.4 ( Jun 3 – Jun 30 )
  • Section 3.1.5 – Section 3.1.7 ( Jul 1 – Jul 10 )
  • Section 3.2 – Section 3.3 ( Jul 11 – Jul 21 )
  • Section 3.4 ( Jul 22 – Jul 31 )
  • Integrated Testing ( Aug 1 – Aug 10 )

Details could be found in http://www.cs.fiu.edu/~rzeng001/proposal_tracing.html

Deliverables

Google Code Site: http://code.google.com/p/rtems-tracing/

The code is available on Google Code Site, addressing following features.

  • extract function signature by objdump, anon renamed.
  • extract typedef and struct/union by objdump, anon rename job FINISHED, recursive anon is considered.
  • log all arguments in both entry and exit, including recursive struct.
  • The log function is simply to print to console, while it will soon be changed to transfer log to host.
  • The isTriggered function simply judge whether function tracing (fenable) is enabled or not in capture engine, while new CLI is drafted in capture engine for that.

Student Information

I am Alan, the first year graduate student in Florida International University, majoring in Computer Science.