Automatic ARM Instrumentation for C Source Code
This is a C library for automatic ARM instrumentation of C/(C++) code.
The C/C++ compiler of the GNU compiler collection (GCC) provides automatic insertion of instrumentation code by a flag called -finstrument-functions. Using this flag, the compiler inserts instrumentation code before and after each function which calls either __cyg_profile_func_enter() or __cyg_profile_func_leave() (see  for a nice article on the GNU profiling functions). The application program can implement this function for any purpose - for example performance instrumentation for bottleneck analysis.
Exactly this purposes is the goal of the standard API for Application Response Measurement (ARM, ). A lot of management tools provide agents for this API to collect those data from different sources.
Therefore the idea was to bridge between GNU profiling functions and the ARM API. This library contains implementations of the profiling functions which gather and preprocess the information and forward it to the ARM 4 API.
You can use the library for C++ source code too, but the class names are not considered.
This section describes the steps to automatically instrument your C files.
Compile all files you want to insert instrumentation code with at least the following flags:
Link your binary with the following libraries:
<arm_agent_lib> is an ARM agent library of your choice. In the ARM 4.0 SDK is an example library (libarm4logger.so) which simply logs all information to stdout. The ARM 4.0 SDK is bundled with this package.
Look into directory "example" for an example.
This software is published under GNU Public License V3.
Download the ARM 4.0 SDK for an example ARM agent.