- Welcome to Simply Fortran
- Purchasing and Activating Simply Fortran
- Using Simply Fortran
- The Simply Fortran Interface
- Editing in Simply Fortran
- Projects in Simply Fortran
- Building Projects
- Launching Projects
- Debugging Programs
- External Tools
- Options and Configuration
Simply Fortran’s profiling feature can be used to analyze the frequency and duration of procedure calls within a project’s target. This analysis can aid developers in identifying bottlenecks and performing manual optimization of project code.
Before the analysis can be performed, the target executable must be run to generate profiling data. When profiling is enabled for a given project, the executable, when it runs, will generate a file gmon.out in the working directory containing profiling data. This file is not human-readable. Because the profiler relies on a statistical analysis, longer target execution times are preferable for the purposes of generating sufficient data.
After running a program with profiling enabled, the user can the click Profile in the Build menu or select the stopwatch on the toolbar to perform the analysis. Simply Fortran will then launch a background process using the GNU Profiler to analyze the data. Once the background process completes, a tab named Profile Results will open.
The profiling results are divided into two separate sections, as described below.
Flat Profile Results
The Flat Profile Results show a breakdown of the procedures called during target execution sorted by percent of total execution time. The columns are defined as follows:
|Procedure||The name of the procedure, which can be clicked to navigate to said procedure if it is part of the current project|
|Percent of Total Time||Percent of total time spent in the named procedure|
|Cumulative Time||The running total of execution time in seconds|
|Self Time||The number of seconds spent executing the named procedure|
|Calls||The number of times a function was called. This value is occasionally unavailable for procedures outside the current project|
Call Graph Results
The Call Graph Results summarize the calls to and from procedures used in the target executable. Each heading lists each of the procedures called during execution. The statistics line directly after each procedure’s heading lists the same statistics as available in the Flat Profile Results. These statistics will be accompanied by the following two tables when appropriate.
Each “Called By” table provides a listing of procedures that called the current procedure of interest. The columns have the following meanings:
|Procedure||The calling procedure name|
|Self Seconds||The time spent in the current procedure when called by the calling procedure|
|Children Seconds||The time spent in procedures called by the current function when called from this calling procedure|
|Calls||The first number specifies the number of times the calling procedure called the current procedure, and the second specifies the total number of calls to the current procedure|
Each “Calls To” table provides a listing of procedures that the current procedure of interest called during execution. The columns have the following meanings:
|Procedure||The procedure name called by the current procedure|
|Self Seconds||The time spent in the called procedure when called by the current procedure|
|Children Seconds||The time spent in procedures called by this called procedure when called from the current procedure|
|Calls||The first number specifies the number of times the current procedure called this procedure, and the second specifies the total number of calls to the called procedure|
For Fortran programs, the profiling results may list a “MAIN__” function. This function represents the main program unit of a Fortran project. This naming convention is merely a stand-in chosen by the Fortran compiler.
Intrinsic procedures will be marked in the results. The results generated by Simply Fortran may list some intrinsic procedures multiple times if different variants, i.e. for different input types, were called.