Explore frame analysis options provided by the
Intel® VTune™, which are especially useful for identifying a long latency activity.
You may use the Frame API to mark the start and finish of the code regions executed repeatedly (
frames) in such applications as simulators with a time step loop, computations with a convergence loop, game applications computing next graphics frame, and so on.
VTuneanalyzes the marked code regions and identifies bottlenecks in your application caused by slow or fast frame rate. To interpret the performance data provided during the frames analysis, you may follow the steps below:
Summarytab to open the
Summarywindow and analyze the
Frames Rate Histogram. Hover over a bar to see the total number of frames in your application executed with a specific frame rate. High number of slow or fast frames signals a performance bottleneck.
VTuneautomatically sets up thresholds for slow and fast frame rate. But you may change them, if needed, by dragging the slider at the bottom of the histogram. The thresholds you set will be automatically applied to all subsequent results for this project.
Switch to the
Bottom-upwindow and group the data in the grid by
Frame Domain/Frame Duration Type/Function/Call Stack:
This grouping displays frame analysis metrics including the Frame Time that is the wall time during which frames were active. Focus on the frames with the highest Frame Time values. Expand a frame domain node to see frames grouped by frame duration. You may select slow frames, right-click and select
Filter In by Selectionto filter out all the data other than slow frames in this domain. Then you may group the data back by
Function/Call Stackto see the functions that took most of the time in these slow frames:
Bottom-upwindow, analyze the frame data represented in the
Timelinepane. If you filtered the grid by slow frames, the Timeline data is also automatically filtered to display data for the selected frames:
The scale area displays frame markers. Hovering over a marker opens a tooltip with details on frame duration, frame rate and so on.
Frame Rateband displays how the frame rate is changing over time. To understand the cause of the bottleneck, identify sections with the Slow or Fast frame types and analyze the
CPU Utilizationdata. For example, you may detect the Slow frame rate for the section with the poor CPU utilization or thread contention. In this case, you may parallelize the code to utilize CPU resources more effectively or optimize the thread management.
To identify a hotspot function containing the critical frame from the Timeline view, select the range with the Slow or Fast frame rate.
VTunehighlights the selected frame in the
Double-click a critical function executing a slow/fast frame to view its source code. By default, the
VTunehighlights the code line in this function that took the most CPU time to execute.