I am looking for information on how to determine CPU usage in various parts of my pgm--this is what I believe is the purpose of VTune.
I have a large C++ and Fortran app (Fortran is in a library), running Win XP32. I'd like to do the analysis on certain parts of this pgm, so I am attempting to do the following:
1) Start the pgm.
2) Get it to the point where I can click a button to start calculations which I want to profile.
3) Let VTune collect data until I tell it to stop.
4) Have VTune analyze the results.
Sounds pretty straightforward, right? But, I get errors at every step of the way.
Problem 1) Identifying the process to be analyzed. I create a new project, choose "Attach to Process" as the target type. ERROR: Cannot find running process with the specified name (I have not specified a name). What is a "Process name"? This is not standard Windows nomenclature. In order to proceed, I have to open Task Manager and look up the process ID. When I input the PID, I can continue.
Problem 2) Collecting data. I select New... / Analysis ... from the File menu. I run the pgm to the desired starting point, then click VTune's Start button. VTune says "Collecting Hotspots data". All appears OK until the pgm has completed its calculations and the Fortran thread terminates. Now VTune gives "Collection failed" error, and terminates my pgm. Error is "Failed to write probes in process, can't complete attach."
Problem 3) Viewing results. There seems to be nowhere to go from here. VTune has apparently discarded all the data it collected. There is nothing under File / Recent Results.
Problem 4) Stopping analysis. Per the VTune doc, "Attaching to a Process", I start data collection, then click Stop before the calculation is complete. Now VTune tells me "Analysis is completed successfully", followed by "Failed to finalize the result". Clicking Re-resolve gives the same error message.
Can anyone tell me how to do this, or point me to documentation that does so?




