Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
2 Views

VTUNE does'nt launch MFC application

Hi,

I am a new to VTUNE. I installed trial version of VTUNE Version 9.0 integratedwithVisual Studio 2005 on Windows XP OS. I am trying to profile a MFC application with VTUNE. The MFC application brings up a GUI in which I set up and run an analysis.

After looking at the users manual, I set up a sampling activity and providedthe executable namefor "application to launch". On starting the activity, the executable does not launch, i.e., the MFC GUI does not come up. However, the task manager shows a process with the application name. Itseems to be running very slow (CPU timein task manager was 17 minutes over 12 hours) but no application GUI came up !!

I removed VS integration and tried the same from VTUNE performance analyser GUI, but encountered the same problem. I also tried delaying VTUNE data acquisition to allow time for application to launch, but did not help.

So, I checked "no application to launch" and launched my application manually. Then, I could use VTUNE to obtain sampling and counter monitor data. However, I am more interested in Call Graph data for which VTUNE has to instrument and launch the application. So, how do I get VTUNE to launch my application ? I am hoping someone can help me onn this.

Also, from the sampling data, when I drill-down to hotspot, VTUNE shows a number of "unresolved addresses" along with application function names. I made sure I compiled and linked with the correct options (as per manual) in Visual Studio. The only linker option I could not find was "Uncheck the Seperate Types option" which seems tobe removed in Visual Studio 2005.

Does anyone know where the problem is ? Please let me know.

Thanks

0 Kudos
3 Replies
Highlighted
Employee
2 Views

Hi:

First, does your application use any managed code (e.g., .NET)? If so, please see this article on our support site.

Next, let's look at the application launch failure. Can you start your application from the "Run" box of the Windows' Start menu using the exact same path as you used in the VTune analyzer activity configuration?

Also, please try using the Sampling Wizard and not the Complete or Quick Performance Analysis wizards.

Regarding "unresolved addresses", two things:
1) there is a known issue if you select more than one module when drilling down, so make sure you only drill down to hotspots/functions for one module at a time.
2) make sure to include full symbolic information in your "Release" build. This requires setting options in the C/C++ and Linker tabs.

0 Kudos
Highlighted
Beginner
2 Views

Hi:

Thanks a lot for your reply.

My application does not use managed code. I could start it from the run box. I have also set up using the sampling wizard. I still cannot get VTUNE to launch it.

Regarding"unresolved addresses", I found thecorrectLinker settings. Ihad to setthe Linker->Advanced->FixedBaseAddress toGenerate a relocation section (/fixed:no). Following this, I could seeall my functions in Static Module viewer. This reduced the number of unresolved addresses but there remain some. These are associated with line numbers in functions which appear in the hotspot view.

I selected only one module but when I drill down from the Process view by my application process name, I see additional modules like ntkrnlpa.exe, ntdll.dll, hal.dll, KERNEL32.dll, etc.. 55% of clockticks are under my application name module. Remaining modules are the rest. So, does it mean 55% of time is spent in my application source code, the remaining in the other modules called by the process?

I could obtain Callgraph data by statically instrumenting and launching my application manually when prompted.

I want to be able to get Tuning advice based on sampling. I understand that Primary tuning events data needs to be generated. I understand once VTUNE is able to launch the executable, it will do callibration runs, etc from multiple launches of executable.

Can this be done manually ?

Thanks in advance

Shrini

0 Kudos
Highlighted
Employee
2 Views

"So, does it mean 55% of time is spent in my application source code, the remaining in the other modules called by the process?"

Yes. It means that, statistically speaking, 55% of all your application's execution time was spent in your app's source code and the rest in the other modules loaded and called by your app.

"I want to be able to get Tuning advice based on sampling. I understand that Primary tuning events data needs to be generated. I understand once VTUNE is able to launch the executable, it will do callibration runs, etc from multiple launches of executable.

Can this be done manually ?"


Yes. Actually, for sampling, the VTune analyzer does not need to be able to launch the app; you can launch the app outside of the analyzer during the data collection activity. Turn calibration off in the sampling collection configuration dialog and just collect the data. Then, when viewing the module view for your app's process, press the F8 key to invoke the Tuning Assistant.

0 Kudos