Linux is a very different beast compared to traditional RTOSes and other platforms we’ve supported with Tracealyzer in the past. Developing the new Linux support has been quite a challenge and we have spent more than a year on this project now. You see, not only is Linux huge in terms of number of objects in even a small system compared to an RTOS, it is also extremely flexible and configurable. Many of the common RTOS features that have been in focus of Tracealyzer historically do not have direct correspondences in Linux systems, and there are several usage patterns that are common on Linux that are practically non-existent on our other supported RTOSes.

Linux threads begets other threads

One example of a usage pattern on Linux that we typically don’t see in traditional RTOSes is having a periodic task spawn a new thread, process or even an entire, complex process tree. On something like FreeRTOS, we will typically measure the time it takes for a single thread to perform one iteration of a while-loop and call that an instance. On Linux, that instance can very well comprise full shell script executions, with multiple child processes executing on multiple processor cores. We have therefore explored new ways of presenting data, and also new variants of some current Tracealyzer views.

Linux also has much greater separation between kernel space and user space. From a tracing point of view, this means that it’s not a single system but rather the kernel + N processes that must be traced more or less independently. The fact that one process has tracing of mutexes, or memory management, doesn’t mean they all have, to pick just one example.

Kernel space vs User space

Many features that are implemented in the kernel of other platforms are implemented in user space libraries on Linux. For example, most threading, synchronization and memory management routines are implemented in user space. Some objects may exist only within a user space process, some may be global in the kernel, and some may exist in the kernel yet have identifiers that are unique in a process or group of processes!

All in all, supporting Linux has proven to be quite an interesting challenge, but we are confident our users will find the result of our efforts useful in analyzing their systems.

By David