| ProfilingSimply 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 ResultsThe 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:
Call Graph ResultsThe 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. Called ByEach “Called By” table provides a listing of procedures that called the current procedure of interest. The columns have the following meanings:
Calls ToEach “Calls To” table provides a listing of procedures that the current procedure of interest called during execution. The columns have the following meanings:
Special ProceduresFor 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. See Also |