Profiling Actions
Overview
The goal of this project is to add the concept of actions to the Eiffel Studio profiler to make the timing of GUI applications easier.
Main Functionality
- In the code the user can add
action_timer.start_action ("myAction") -- action to time action_timer.stop_action
- around interesting parts of code.
- The tool checks if the directory already contains a file named myAction.br (base run). If it does a file named myAction.cr (comparison run) is created, otherwise the base run file is created.
- Then the user can view the timed actions (requires base and comparison runs exist) to see if his code modifications slowed down or speeded up the code
Implementation
I modified the files eif_option.h and option.c in the run-time. When an action ends I save the profiling information into a file with the name of the action. After that I free the profiling stack and reinitialize it:
ht_free(class_table); prof_stack_free(); initprf();
For this to work I modified stop_profile to check a flag and not report a profile stack corruption if the flag is true.