In real-time development, it is often the case that direct end-to-end time measurements and statistics are needed to determine program, design, or specification correctness, and often involves both kernel events and user space or application events. This presentation describes a portable set of open source tools, API’s, and programs for implementation of timing measures between multiple software events based on clock cycles. A CPU abstraction layer is provided for portability to any CPU architecture, and can be used in both kernel and user space, and across events in both spaces. Statistics are collected in the kernel by migrating a RRD database implementation as a statistical kernel module. This in itself can be a nice addition to the kernel. Information about kernel data will be exposed to the user over procfs or sysfs or via a socket or device in /dev/ directory. Information about processes profiled in user space will be executed by means of a dedicated monitoring daemon. The tools provide an easy method for code instrumentation and extraction of results that will benefit most in the real-time Linux development community.
The audience is any developers concerned about meeting real-time performance based specifications for their systems. Further, detailed timing measurements often play a significant role in debugging. Another use case involves CPU as designers often wish to compare algorithms across CPU architectures to help make their decisions, wherein clock cycle measurements may be used for direct “apples-to-apples” comparisons. These direct measurement techniques should benefit most real-time Linux based developments. This work is an easy to use open source development tool for the Linux ecosystem that adds to the already long list of other Linux tools that are useful in real-time Linux based applications.