call tree ordered by a running procedure?

call tree ordered by a running procedure?

I have to understand a big old fortran program associate with lot's of options using similar routines. I'd like to check which subroutines (or functions) are executed under different options. What I usually do with small programs which I can access source codes is put 'print' at different check points, so I can trace the procedure.
This, however, would be a real pain and inefficient way with a big program which may have hundreds of possible brances. While I am thinking about the problem I have I found about the profiling and the VTune. I downloaded an evaluation version of the VTune and have been trying to understand how it works. I can see lots of advatages which can be achieved by using profiling without finding a solution for my own problem.
My problem is so simple and can be solved if a list of calling procedures for subroutines (or functions) executed during a running process is given. VTune results with default options show call graphs with integrated called numbers, so I cannot distinguish modules of the same routine but called at different times or points during a running process. For instance, I have a module named C which is called depending on a given value for a option.
if option == a
call C <== case 1
else if option == b
call C <== case 2
call D
end if
In VTune, the total number that C has been called is given by default. How can I distinguish case 1 and 2?
It might be so simple but not easy to find the solution as a VTune novice.
I'll really appreciate if somebody let me know how to do this.

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Community Admin's picture

In source view, look for the Call Site columns. It will show you the information you are interested in - the number of calls and time in each call site.

Thanks, boazt. But the information is not exactly what I want. It seems my original problem statement is too long without hitting the bull's eye.

In short, I am wondering if there is a way that VTune can show all subroutines (functions) called in a time sequential order (as if putting a line at the beginning of all subroutines to print the name of each subroutine whenever it is called sequentially).

Community Admin's picture

In short, No.
VTune does not keep a trace of the calls. The data is collected as a call tree, so the sequence information is "lost".

Collecting the information as a trace (sequence of calls) will make your collected data huge, and is not practical.

Boaz.

I see.
Thanks a lot.

Login to leave a comment.