Profiling: Finding Regions of Interest with Intel® GPA Framework

Use the Intel® Graphics Performance Analyzers' cli - Intel®  GPA Framework -  to find regions of interest in your rendering applications.



Smart Profiling With Intel® GPA Framework

Application optimization requires smart profiling. You don't need to profile every frame, but you do need to find the key areas that will help you optimize your application to increase frame rate or frame time consistency.

Use the command-line interface of Intel® Graphics Performance Analyzers (Intel® GPA) to find ranges of frames that do not meet your performance criteria in order to help you identify which parts of your application you should analyze.

Identify Ranges With Particular Criteria

Find sequences of frames that fit particular criteria, such as frame time exceeding 70ms.

gpa-stream-analyzer.exe Usage

Using gpa-stream-analyzer in conjunction with python functionality can help you delineate ranges of data anomalies, aiding in  optimization.

# Use the gpa-stream-analyzer utility to displays capture-time performance as a labeled csv data table.
# Usage: gpa-stream-analyzer.exe [options] <stream>
$ gpa-stream-analyzer <stream> > out.csv

# The related helper scripts require python 3.7+, as well as a standard install of the numpy, pandas, and matplotlib modules.

# To smooth the frame duration data, use
# Usage: [-h] [-i INPUT] [-p PERIOD] select 
$ python -i out.csv -p 30 cpu_frame_ms > my-moving-average.csv

# Optionally, chart the data to visualize the results as an image (svg) using
# Usage: [-h] [--average] [--format FORMAT] [--limit LIMIT] [--name NAME] [--scurve] [--series SERIES] [--series2 SERIES2] [--title TITLE] [--vsync] [--width WIDTH] input
$ python my-moving-average.csv --series cpu_frame_ms --series2 cpu_frame_ms_moving_average_30

# To classify the resulting data according to a user specified (frame ms) threshold, use
# Usage: [-h] [-i INPUT] select threshold 
$ python -i my-moving-average.csv cpu_frame_ms_moving_average_30 70 > my-partitions.csv

# To display a table of start/count of frame(s) which exceed the threshold, use
# Usage: [-h] [-i INPUT] select mask 
$ python -i my-partitions.csv cpu_frame_ms_moving_average_30 cpu_frame_ms_moving_average_30_gt_70


image of regions found where frame time exceeds 70ms


Once you have identified a range of frames of interest, the gpa-subcapture-recorder can be used to generate a new stream containing only the frames you care about. For more information on sub-capture, see Intel® GPA Framework: Deferred Capture and Sub-capture Replace Keyframing.

The chart shows that gpa-stream-analyzer and its helper functions located two partitions, that is, two places that delineate sections that contain frames that take less than vs. greater than 70ms to process. We see that there is a range of 40 frames that exceed 70ms, starting at frame 353.

Back to Deferred Capture and Subcapture...