|
|||||||
CarmAutomatic ARM Instrumentation for C Source Code~2006 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 [1] 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, [2]). 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. FEATURES
You can use the library for C++ source code too, but the class names are not considered. AUTOMATIC INSTRUMENTATIONThis 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: CFLAGS=-g -rdynamic -finstrument-functions
Link your binary with the following libraries: LDFLAGS=-lcarm -ldl -lglib-2.0 -l<arm_agent_lib>
<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. DEPENDENCIES
LINKSLICENSEThis software is published under GNU Public License V3. DOWNLOADDownload the ARM 4.0 SDK for an example ARM agent.
Holger Machens, 02-Jan-2021
|
|||||||