Download Comparative Study on Real Time Enhanced Linux
Transcript
168 CHAPTER 10. DEBUGGING The third issue noted above, synchronization complexity, is especially aggravated by concepts like priority inheritance and priority ceiling protocols, as well as specifics of the scheduling policy (FIFO,round-robin,EDF, etc). Validating temporal behavior of a multi-threaded system relying heavily on thread synchronization mechanisms can not be done without internal knowledge of the core RTOS system, this is a limitation on the side of the developers not the system and the only way out is that developers of RTOS systems need RTOS knowledge to perform temporal system validation. Tools that do help are tracers (see below) but they don’t eliminate the demand for RT specific know-how on the side of the developer. The last two points noted above, recording overhead and time stamp limitations of the system, are also RT-system inherent. Recording the sequential instruction path of a system requires a certain processing overhead for the recording instructions and the memory access for trace-data storage. Fortunately tracers have been developed that have a sufficiently small overhead (¡5 TRACE TOOLS As the problems of temporal debugging are inherent in RTOS, the development of tools to cope with these problems evolved fairly early in the various flavors of hard-realtime Linux. RTLinux tracer The RTLinux tracer, implemented by Michael Barabanov, was the first approach to temporal debuging in hard real-time Linux extensions. The basic concept is to have shared memory areas that provide a predefined number of event-buffers, these event-buffers are continuously written to at critical points in the core OS and the application code. The application then can trigger a trace by calling RTL TRACE FINALIZE, which then causes the tracer to switch to the next free event-buffer and continue recording. This method allows to backtrace temporal dependancies starting at the event of interest and thus analize the hot-spots in the code. Naturally this can’t happen without a cirtain overhead for the recording process, but this overhead is in the range of 1%. The RTLinux tracer is integrated in the main RTLinux/GPL development tree and is also part of the comercial RTLinux/Pro distribution. Linux Trace Tool kit, LTT LTT was originally developed for kernel development of the mainstream Linux kernel and is still maintained for this purpose, it is a good tool to move into the internals of the Linux kernel. http://www.opersys.com/LTT/downloads.html POSIX tracer The POSIX tracer is a kernel module that performs a similar event trace as the rtl tracer module. Debugging of complex rt-applications