Light Weight DynInst Engine for Embedded SystemsAlexander Shirshikov
Currently a lot of monitoring tools use DynInst as base for data collecting by using dynamic instrumentation technique for user-space applications. Such popularity of this open source project is invoked by powerful profiling and tracing abilities, convinient API and low instrumentation overhead because of using light jumping technique for instrumentation. However, DynInst has some disadvantages that make it non-perspective for embedded systems: great efforts for porting for new embedded devices because of large machine-dependent parts, significant requirements for memory and CPU resources, great size of binaries.
In this article we present a Light-Weight DynInst Engine (LWDE). LWDE was designed for reducing of DynInst disadvantages with keeping its main power features. As a result we have reduced object size and code size of DynInst libraries significantly. Our experiments for common Linux application gbzip2 (instrumentation of ENTRY/EXIT for all functions) shows that we have reduced maximal CPU load on target during instrumentation in more than 20 times and memory footprint in more than 3 times. LWDE uses the similar to DynInst instrumentation method, however, run-time overhead of LWDE is quit smaller in comparison to DynInst because of some modifications of instrumentation algorithm were provided. Additionaly, it should be noted that LWDE implements a main set of Dyninst API that make it comfortable for developers that are familar with native DynInst project. Because of these enchansments LWDE can be used on modern embedded devices in a comfortable way.