Atom
Overview
Atom is a system to build customized analysis tools on the Alpha
21064. Atom is a program that takes as input an application
binary, and two c files. The two C files makes up a 'tool' One
describe what to measure about the application program, and the other
is the C file to analyize the data that is measured when the
application program executes. The output is an instrumented binary,
that when executed outputs a .out file of analysis
results.
The information avaiable for anaylsis is:
- Program structure information, including basic blocks.
- Instruction information: type, class, the instruction itself,
PC of instruction, register information (input and output registers).
- Run time information including: effective address, branch
condition value, register values, process cycle counter, PC at
instrumentation point, and function return values, among other things.
The flexibility that Atom offers is the ability to add arbitrary
procedure calls before and after instructions, basic blocks,
procedures, and the whole program. It is also possible to replace
arbitrary procedures called by the application program with other
procedures.
Other Information
On the alpha's, some general information about Atom is avaiable in
/usr/lib/Atom, including man pages and the user and reference
manual.
A copy of the user manual in Postscript is available
here. Other manuals available direct from DEC's WRL research lab
include
a technical note and a
research report .
You might also find it useful to look in
/usr/lib/atom/Atom/instrument.h for some information about
how to use the functions described in the manual. There is also a
copy here.
Available tools
There are a few available tools on the alphas, in
/usr/lib/atom/examples, they include:
- cache simulates an 8K direct mapped data cache
- malloc compiles a histogram of calls to malloc
- trace traces the effective address of each data reference
- dyninst computes dynamic instruction, basic block, and
load and store counts.
- prof profiles program execution (#insturctions
executed per procedure)
- branch computes branch prediction rate for each
conditional branch and overall rate using a 256 two bit history table.
- dtb determines the number of dtb misses given 8K byte
pages and fully associative translation buffer.
- inline determines potential candidates for procedure inlining.
How to Run
An application must be compiled in the following way (using
helloworld as an example:
cc -Wl,-r -non_shared helloworld.c -o helloworld.rr
Then we can compose an instrumented application in either of the
following ways:
atom helloworld.rr -tool iprof -o helloworld.iprof
atom helloworld.rr /usr/lib/atom/tools/iprof.inst.c
/usr/lib/atom/tools/iprof.anal.c -o helloworld.iprof
Then when you execute:
helloworld.iprof
The file, iprof.out
is generated. It contains the
results of the analysis.