You can target specific sections in your application that you would like to profile by inserting the VTPause() and VTResume() function calls in your code.
You can profile applications with inserted Pause/Resume APIs on a remote system running on a Windows* or Linux* operating system.
Create an Activity and configure your data collector (sampling, call graph).
Prepare your compilation and running environment following the steps in the Before You Begin Controlling Data Collection topic.
Insert the VTPause() call in your code where you want the VTune analyzer to stop data collection.
Insert the VTResume() call in your code where you want the VTune analyzer to resume data collection.
Compile and execute your application.
Click Run Activity (or use the run
command if you work from the command line) to start
data collection.
Once the data is collected, you can view the data in the standard collector views.
The Pause/Resume Activity
toggle button in the toolbar provides the same functionality as the Pause/Resume API.
If you use the -start-paused option when creating an Activity from the command line, data collection begins only after the Resume API in your code executes or when you invoke the ActivityController with the -resume option.
Use the Pause/Resume API to pause/resume the Activity with multiple runs. If your Activity consists of a single run only, you may use the pause/resume functionality of the ActivityController when working from the command line.
Use the -start-paused option when creating an Activity from the command line if you want to control when the VTune analyzer starts sampling your application. If your application uses the VTPause() and VTResume()API, and you use the -start-paused option and run the Activity, the VTune analyzer launches your application if you specified one, but does not start sampling data collection until the VTResume() API in your code executes.
To pause and resume sampling without using the API in your code, use the -start-paused option and invoke the ActivityController utility to resume or pause data collection when you run the Activity.