Prerequisistes to use this tutorial
A working ARM installation
To compile and run the example programs no special actions have to be done. Just go to the source code and compile it as you do with other Qt-based software. To use the example programs reasonable some prerequisites have to be fulfilled. A working ARM installation (e.g. libarm4.so shared library) is needed if you want to see any ARM measurements. Therefore you need to download and install an ARM implementation.
This can be downloaded either from The Open Group website (or from ARM4SDK open source website using the ARM4SDK as a reference implementation or from the MyARM website as a free of charge community edition or a 30-day evaluation license. All are free of charge but be aware that the ARM4SDK does not provide an agent or a management implementation, i.e. the measured data is only printed on the console. Nevertheless this is enough to get the examples working and to get a first understanding on how ARM works.
The first examples (t1, t2, t3)
For the first examples (t1, t2 and t3) you will only need an installed version of Qt4 besides the ARM installation mentioned above.
The SQL example (t4)
The SQL example (t4) additionally requires an installed SQLite or MySQL library. To get a complete measurement of the whole application (the Qt part as well as the database part), an instrumented version of the SQLite or MySQL library is recommended (we have created an instrumented version of both SQL libraries. See the MyARM ARM instrumentation page for details).
The MySQL/Apache example (t5)
The apache example (t5) additionally requires an Apache web server where the mod_arm4 module is enabled (see MyARM apache modules page ) as well as an instrumented MySQL database (see the MyARM MySQL page ).
We know how hard it can be to fulfil all the prerequisites needed to run tutorial t5 (installation and configuration of a MySQL database, and an instrumented apache web server). Therefore we decided to offer a web server with an instrumented MySQL database for the QArm examples for free. You then only need to run the Qt frontend locally on your computer, connect to our web server via the internet and watch the measurement results with our cgi interface. For details please refer to the corresponding chapter in this tutorial.
Miscellaneous Information
The software directory tree
You should have received this tutorial together with a software CD or an installation directory with a layout as shown in "directory layout" .

Figure: The directory layout of the software tree
The software directory tree is organised as follows:
- The
docdirectory consists of ahtmland apdfsubdirectory. Thepdfsubdirectory contains this tutorial as well as the API description of the QArm API. Thehtmldirectory only contains the API description in html format. If you received this tutorial on a CD or downloaded the ISO image you will find in this directory more information like the MyARM API specification, generic ARM descriptions and so forth. - The
tutorialdirectory contains the source code for the examples described in this tutorial. Each subdirectory t1 to t5 will contain a shell-scriptstart.shafter compilation which should be executed instead of the binaries t1 to t5 directly. This will set theLD_LIBRARY_PATHvariable to the directory where the QArm shared library resides. Please be aware that you still have to extend this variable with the path where the ARM4 library is located, otherwise the examples will work but do not make use of the ARM interface. - The
src/qarmdirectory contains the source code of the QArm API.
Compilation instructions
MyARM decided to use a technique of dynamic binding of ARM
functions during runtime, i.e. it is not necessary to have an ARM
library available during compile-time. To get meaningful results
during runtime you should let your LD_LIBRARY_PATH
point to the directory where your ARM4 library is located. You will
even be able to run the examples without any ARM4 library installed
but this does not make too much sense because no ARM measurements
are made.
For compilation you just have to go to the root directory of your QArm distribution and say
qmake
make
to compile the QArm API as well as the tutorial examples t1 to t5.
After compilation a shared library is created from the QArm
source code which can be found in the lib directory
directly under the root of the software tree. The headers will then
be placed in the directory include/QArm on the same
directory level.