Low Level Logging APIs
From TracingWiki
While the basic principles of manual instrumentation are applicable to both high level applications and low level system software, the context, constraints and tradeoffs differ. The system software (e.g. Linux kernel, Xen hypervisor) is written in C, a great emphasis is placed on efficiency, and reentrancy and latency are important considerations.
Linux had from the very beginning the printk statement, not necessarily very efficient but simple and thus relatively robust. Over the years, several more structured frameworks were proposed for logging and tracing, from Event logger, evlog, to the Linux Kernel State Tracer, LKST, the Linux Trace Toolkit, LTT, the Driver Tracing Infrastructure, DTI, and the Linux Trace Toolkit next generation, LTTng.
The buffering mechanism from LTT, Relay, was included into the mainline Linux kernel in 2005. The source code instrumentation mechanism proposed by LTTng, Kernel Markers, was included into the mainline Linux kernel in 2008. The LKST team is now collaborating with the SystemTap project on dynamic tracepoints. There seems to be general agreement that tracing is making its way into the mainline Linux kernel. However, it is taking a long time and the proposed systems have to convince that they represent the right tradeoff between simplicity, efficiency, low intrusiveness and low disturbance.
