EasyManua.ls Logo

Intel i960 - Runtime Support for Profile Collection

Intel i960
347 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Program-wide Analysis and Optimization
4-15
4
make SUBST=O5 PROF=prog.spf
Again, the make tool performs no compilations. The following link
command is issued:
ic960 -o prog -Ttarg -fdb -gcdm,subst=*:*,+O5,
iprof=prog.spf fee.o foo.o
This causes substitution modules at optimization level O5 to be built
(guided by the profile in
prog.spf) to replace the original modules fee.o
and foo.o in the program load module prog.
Runtime Support for Profile Collection
When you link your instrumented program with the standard libraries and
startup code, when your program exits, a raw profile named
default.pf
is automatically produced in the current directory. The format of this file
is described in Chapter 5, Profile Data Merging and Data Format
(gmpf960).
When you are not using the standard libraries, you must provide code to
initialize the profile counters and to dump the counters in the required
format, as described below.
Profile Initialization
Your startup code must call a profile initialization routine before calling
main. The address of the default initialization routine is held in the
predefined variable
__profile_init_ptr. Here is an example of a call
to the default initialization routine:
.comm __profile_init_ptr
ld __profile_init_ptr, r6
cmpobe 0, r6, 0f
lda 0(ip), g0
lda ., g1
subo g1, g0, g0
addo g0, r6, r6 # adjust for PIC
callx (r6)
0:

Table of Contents

Related product manuals