DRA --> User's guide --> options

Option MAIN

The only valid specification is MAIN()

Causes DRA to analyse functions in the main program. This is the program that contains the "main" function, which is the first function of the application to receive control from Language Environment immediately after the Enclave is initialized. The "main" function can subsequently call other functions in the main program, or call functions imported from explicitely or impicitly loaded DLL's. Imported functions can also be analyzed by specifying option DLL.

When option MAIN is specified, DRA installs a "function interceptor" for every function represented by a Function Descriptor. Consequently, every call to such a function will be intercepted giving DRA an opportunity to take a time measurement before making the call, and again after return from the called function.

You can use option FUN to specify a selection criteria. This is a string that serves as a "white" filter. If you use this option then DRA will only install function interceptors for functions whose names start with the specified string.

If option TIME is in effect then the function interceptor:
takes a time measurement
calls the intercepted function through the original (saved) pointer
takes another time measurement after the call
computes the time used during the call and saves it for the report at the completion of the program
increment counter "number of calls" for the report at the completion of the program
If option TRACE is in effect then the function interceptor:
traces the name of the called function as well as the name of the caller
traces the time used by the call

Example:
main calls BATINIT
TIME=179195 microsecs (cpu=12737 wait=166458) BATINIT