Linux Symposium

Dynamic Instrumentation of Mixed ARM/Thumb Binary Code

Alexey Gerenkov

During the last decade CE devices based on ARM platform have become widespread on the market. One of the ARM processors' benefits which makes them quite suitable for CE systems is support of Thumb instructions. They allows to generate compact program binary code and therefore to use device's storage more effectively. Often mixed native ARM and Thumb code is used in devices. For example, well known mobile platform Android uses such mixed code. The mixture of different types of instructions can lead to problems when using some types of debugging techniques, for example, dynamic instrumentation by means of insertion of break instructions into binary code. This technique is used in well known Linux tool KProbe.

In this paper we describe universal method of dynamic instrumentation used in our monitoring tool --- System-Wide Analyzer of Performance (SWAP). This method works for both types of instructions. So it can be used on systems with mixed ARM/Thumb code including modern Android systems. So it can be used in the systems which lack such information, for example, production systems which are cleared from redundant data. All above mentioned benefits of our method make it is possible to use on modern CE devices powerful profiling technic - dynamic instrumentation.

Policies   |   Media Archives