Next: Simulation of Real Programs
Up: The Simulator
Previous: Simulator Implementation
Statistics on each function are collected during the simulation.
These statistics include:
- Number of calls
- The number of times the function has been
called.
- Accumulated interpreted time
- The total amount of time, over
all calls, spent interpreting the function.
- Accumulated native time
- The total amount of time, over all
calls, spent running the native code for the function.
In addition, statistics on the entire program are gathered. This
includes:
- total execution time,
- time spent interpreting source code,
- time spent executing translated (non-library) code,
- time spent executing library routines, and
- time spent translating source code to native code.
As mentioned earlier, we are assuming that the Interpreter and
Compiler modules are physically running in parallel, so the
total execution time reported does not include the time spent
translating. However, the total time for a single-processor system
can be calculated by simply summing the total execution time and the
translation time, and adding in some additional amount to account for
the overhead of context switching.
In addition to the above, the following information about source files
can be output:
- sorted list (in descending order) based on the total number of
calls to all functions defined in the file,
- sorted list (in descending order) based on the total execution
time of all functions defined in the file, where the total execution
time for a function is calculated without the interpretation penalty,
and
- the point in time that the Compiler module completes
translation of each file.
The sorted lists are useful for implementing the
most-frequently-executed-overall and longest-overall strategies.
The lists can be used to specify the compilation order for subsequent
runs of the simulator with the same setup and behavior files.
Next: Simulation of Real Programs
Up: The Simulator
Previous: Simulator Implementation