Runtime Support For Profile Collection - Intel i960 User Manual

Processor compiler
Hide thumbs Also See for i960:
Table of Contents

Advertisement

Program-wide Analysis and Optimization
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
(guided by the profile in
and
foo.o

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
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
. The address of the default initialization routine is held in the
main
predefined variable
to the default initialization routine:
.comm
ld
cmpobe
lda
lda
subo
addo
callx
0:
prog.spf
in the program load module
__profile_init_ptr
__profile_init_ptr
__profile_init_ptr, r6
0, r6, 0f
0(ip), g0
., g1
g1, g0, g0
g0, r6, r6
(r6)
to be built
O5
) to replace the original modules
.
prog
. Here is an example of a call
# adjust for PIC
4
fee.o
default.pf
4-15

Advertisement

Table of Contents
loading

Table of Contents