Custom Counter Groups in PVRTuneComplete¶
When working with counters, it may be helpful to use user-defined counter groups. To create these, select Edit… from the Counter Table window, which opens the Custom Counter Groups dialog.
This dialog lists all the defined counter groups along with a set of options:
Option |
Effect |
|---|---|
New |
Creates a new custom counter group without any counters. |
Clone |
Duplicates the currently selected counter group. |
Rename |
Changes the filename of the currently selected custom counter group. |
Delete |
Removes the currently selected counter group. |
Edit |
Allows counters to be added to removed from the selected counter group. |
Load Default |
Loads the default counter groups |
Load |
Loads saved counter groups |
Save |
Saves the selected custom counter group as a .pvrtunecg file. |
CSV Import |
Import counter groups from a CSV file. |
CSV Export |
Export the current counter groups to a CSV file. |
Accept |
Closes the dialog with changes saved. |
Cancel |
Closes the dialog without saving any changes. |
Counter groups are specific to hardware specifications - the Edit button will only work when a specific hardware series is selected in this dialog. If there is an active connection, or a recording opened in the GUI, then selecting the group name and clicking Edit or double-clicking the name will default to that hardware series (also highlighted in the top row with an asterisk).
Creating a Custom Counter Group with Pre-Defined Counters¶
Select the Edit button which is found in the Counter Table window. This opens the Custom Counter groups dialog which lists all defined counter groups. Selecting New will create a new group, which can be populated by selecting Edit.
Selecting Edit displays a list of available counters.
Choose a suitable option from the list and then select Add Counter to Group. If needed, use the Filter Text field to get to the required items faster. The displayed information will automatically update to include the associated details.
Note
As counters are being added to the counter group, the HW Block Capacity panel will start to fill up. The HW Block Capacity panel provides the number of sources available per hardware block to be used by the counter group. As soon as a block exceeds the number of sources it can support, this panel will display an error. The custom counter group will not be saved until the error is fixed.
Select the Accept button to save the user-defined counter group.
To remove a counter from the group, select it and then choose Remove.
Creating a Custom Counter Group with User-defined Counters¶
If a counter to add to a custom counter group is not available, it may be possible to create it by selecting New Counter in the Custom Counter Group window. This opens the Create New Counters dialog.
This dialog is split into multiple tabs, each one displaying an exhaustive list of counters for the different hardware blocks, which is dependent on the connected device. Information about these blocks and counters can be found in the relevant hardware reference manual. There is no capacity limit for reading global counters, which include counter sources such as memory bandwidth and data master information.
From these lists, a hardware counter source can be added to the Counter Sources Shortlist. The sources in the shortlist can be combined mathematically using an equation in the New Counter Equation box.
Counter sources can be inserted into this box by using the context menu and selecting Insert text. These sources can be combined using basic mathematical operations, including add (+), subtract (-), multiply ( -), and divide (/), but a useful set of functions can also be used:
log2(<argument)finds the log to the base 2 of the argument;max(<argument>,<argument>)returns the argument with the larger value;total(<source-name>)calculates the total counter of a counter source of the profiling period;mean(<source-name>)calculates the average value of the particular counter source;cap(<capability-name>)is used to specify a capability of the hardware an application is running on, for example the number of pixels per tile.
The hardware capabilities that can be specified usingcap() in PVRTune are given below:
USSEPipes: Number of shader pipelines;ISPPipes: Number of ISP pipelines;TATriPerClk: Triangles per clock of the tile accelerator (TA);ISPTriPerClk: Triangles per clock of the ISP;PixelsPerTile: Number of pixels per tile;ALUPipes: Number of ALU pipelines;PTE: Boolean which specifies whether Perfect Tiling Engine is available;ISPPixelPerClk: Pixels per block of the ISP;MSAA2XFullRate: Boolean which specifies whether MSAA 2x at full rate is available;SLCBusWidth: Width of SLC bus in bytes;SLCBanks: Number of SLC banks.MaxISPTilesInFlight: Maximum ISP tiles in flight.PBEPxlPerClk: Pixel backend (max) pixels/clock.BTUPerRAC: Box testers per RAC.DTTUPerRAC: Triangle testers per RAC.PTUPerRAC: Procedural testers per RAC.USCSlots: Slots per USC.
More information on the PowerVR hardware can be found in the Introduction to PowerVR for Developers.
An example counter equation for Triangles input per second is demonstrated below:
((total(RGX1--TA:Triangles input(eRGX1-TA--PPP-PRIMITIVE))/total(TimeHostUS))*1000000.000000)
Four counters will be created when the counter sources are combined:
A raw counter;
One each for:
Per clock
Per frame
Per second.
Some global counter sources are absolute numbers rather than counters. For these, only the raw counter will be created.
To edit the counter source, select it and choose Modify Selected, which opens the HW Counter Source.