-g
and with
-pg
, the usual gmon.out
files will be generated. These can be viewed with xprofiler, a GUI.
Here, for example, we see the call tree of a large program, reconstructed
from the gmon.out
files:
If you click on a routine with the right mouse button, you have a selection of information you can see about that routine, including an annotated source listing. Here is a portion of an annotated program source, showing the "do 12225" loop which contains many tick marks.
Line Ticks ---- ----- 135 2 do 12225 j = 1, ndemm 136 demand(j) = 0. 137 do 12230 k = 1, nsupm 138 2 test =(-supp(k) - thxlin(k, j))*(1. + tar(k, j)) + demp(j) 139 1 apath = apatho(k, j) + rho * test 140 28 if (apath .lt. 0.) apath = 0. 141 38 if (abs(apath- apatho(k,j)) .le. .01) iict = iict+1 142 apatho(k, j) = apath 143 33 supply(k) = supply(k) + apath 144 demand(j) = demand(j) + apath 145 12230 continue 146 12225 continue