Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)

Callgraph Issues.

girish_vaithees
Beginner
729 Views
I am trying to get callgraph information on my application. The application runs for almost 1hour. There is a startup phase which takes around 2-3 minutes. The steady state for this application only starts after 10 minutes or so. I launch the application through vtune in the callgraph mode. However the callgraph process stops indicating "Updating call graph database" followed by "Done" in 2 minutes. As a result the data I see in the viewer is all functions pertaining to startup which I am really not interested in.
So what I would like to know is, what is the best way for me to collect callgraph information during steady state. Any amount of tweaking the
following parameters don't help
1. Changed the duration from 20 seconds [ no effect ]
2. Chose a list of functions to be instrumented [still callgraph ends in 2 minutes]
3. Uncheck the "Limit collection buffer size"
i am using Vtune Performance Analyzer 7.2 and using the remote data collector on Linux.
0 Kudos
8 Replies
jeffrey-gallagher
729 Views
Have you tried using the pause and resume APIs that come with the software? You can add those to your code, and bring up callgraph in a paused mode.
That way, you collect data only about the precise section of code that you are interested in.
jdg
0 Kudos
girish_vaithees
Beginner
729 Views
Jeff,
Is there a document describing how to use these API's.
Thx
-girish
0 Kudos
jeffrey-gallagher
729 Views
There may be something minimal in the USER'S GUIDE but I think the best description is the comments in the header file:
/opt/intel/vtune/analyzer/include/VtuneApi.h
Take a look and see what you think.
If that doesn't help, head on over to Premier support and see if they have some docs I just haven't stumbled across yet.
jdg
0 Kudos
girish_vaithees
Beginner
729 Views
Thanks Jeff,
I managed to find some good documentation under
I will try it out and let you know how it goes. It would be nice if this option is made part of the GUI and not requiring the user to have to do any code changes. The Callgraph tool is exteremely useful and what would be nice is to have a start and stop option to it similar to sampling.
Thx
-girish
0 Kudos
TimP
Honored Contributor III
729 Views
The GUI provides for delaying the start of sampling by
a fixed time interval. If your application is in a steady
state by expiration of delay, that may be good enough.
Using the API to trigger the sampling at a repeatable point
in your application should be more accurate, but it's
difficult to see how that could be done in the GUI.
0 Kudos
girish_vaithees
Beginner
729 Views
I tried using the API but any number of attempts to do this only result in Empty result files. This is what I did
1) Added a VTResume() in my application and rebuilt my application
2) Started the application through the VTune GUI while Checking the box "Start with data collection paused"
3) Let the application run for quite a while and I am very certain that the VTResume call must have been invoked by now.
4) The "Pause" button does not ever seem to go off. I am not sure why this is the case. Once I press the "Stop" button I gett he message
"The result file is empty"
"The view will close"
As far as I can see I have followed the instructions provided in the docs. Am I missing something here. I have tried this multiple times with the same result.

Thx
-girish
0 Kudos
jeffrey-gallagher
729 Views
It looks like the section of code didn't launch.
Is it an inline module? If so, we won't catch it.
Can you try the API on a simple test case?
If not, open a premier case on this, and pack up the data: attache the .vxp file to the case to speed things up. Wouldn't hurt to indicate that you got the advice to open a premier case from IDS forum.
cheers
jdg
0 Kudos
Andrey_G_Intel1
Employee
729 Views
Hi,
I have something to add.
Most probably the problem is not in Pause/Resume API. The problem is that CG data collection stops when application is starting up. So when application gets to a step where Resume() call is invoked no active collectors are in the system. Girish, could you pleasespecify how many times and how many instances of your module of interest are started during application work? Does CG collectionfinish before your module of interest is started or after?
0 Kudos
Reply