Counter Sampling

Retrieve information about how the GPU executed your commands.

Topics

Sample Buffers

MTLCounterSampleBufferDescriptor

A description of how to create a counter sample buffer.

MTLCounterSampleBuffer

An object that stores counter samples.

MTLCounterDontSample

A value that indicates that you want a sample to be omitted.

Counters and Counter Sets

MTLCommonCounter

Names of common counters.

MTLCommonCounterSet

Options for specifying commonly used sets of counters.

MTLCounterSet

A set of counters to sample.

MTLCounter

A descriptor for a single counter.

Sample Results

MTLCounterResultStageUtilization

The result from sampling a stage-utilization counter set.

MTLCounterResultStatistic

The result from sampling a statistics counter set.

MTLCounterResultTimestamp

The result from sampling a timestamp counter set.

Error Handling

MTLCounterSampleBufferError

Constants for error codes returned by Metal for counter sampling errors.

MTLCounterErrorDomain

The error domain for counter errors.

MTLCounterErrorValue

A value in a counter sample indicating that this counter does not contain valid information.

See Also

Command Setup

Setting Up a Command Structure

Discover how Metal executes commands on a GPU.

MTLCommandQueue

A queue that organizes command buffers to be executed by a GPU.

MTLCommandBuffer

A container that stores encoded commands for the GPU to execute.

MTLCommandEncoder

An encoder that writes GPU commands into a command buffer.