# CUpti_PCSamplingData Struct Reference
[CUPTI PC Sampling API]

Collected PC Sampling data.

## Data Fields
size_t | collectNumPcs
uint64_t | droppedSamples
uint8_t | hardwareBufferFull
uint64_t | nonUsrKernelsTotalSamples
CUpti_PCSamplingPCData * | pPcData
| collectNumPcs
uint64_t | rangeId
size_t | remainingNumPcs
size_t | size
size_t | totalNumPcs
uint64_t | totalSamples

## Field Documentation

size_t CUpti_PCSamplingData::collectNumPcs

[w] Number of PCs to be collected

uint64_t CUpti_PCSamplingData::droppedSamples

[r] Number of samples that were dropped by hardware due to backpressure/overflow.

uint8_t CUpti_PCSamplingData::hardwareBufferFull

[r] Status of the hardware buffer. CUPTI returns the error code CUPTI_ERROR_OUT_OF_MEMORY when hardware buffer is full. When hardware buffer is full, user will get pc data as 0. To mitigate this issue, one or more of the below options can be tried: 1. Increase the hardware buffer size using the attribute CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_HARDWARE_BUFFER_SIZE 2. Decrease the thread sleep span using the attribute CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_WORKER_THREAD_PERIODIC_SLEEP_SPAN 3. Decrease the sampling frequency using the attribute CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_PERIOD

uint64_t CUpti_PCSamplingData::nonUsrKernelsTotalSamples

[r] Number of samples collected across all non user kernels PCs. It includes samples for non-user kernels. It includes counts for all non selected stall reasons as well. CUPTI does not provide PC records for non-user kernels.

CUpti_PCSamplingPCData* CUpti_PCSamplingData::pPcData

[r] Profiled PC data This data struct should have enough memory to collect number of PCs mentioned in

uint64_t CUpti_PCSamplingData::rangeId

[r] Unique identifier for each range. Data collected across multiple ranges in multiple buffers can be identified using range id.

size_t CUpti_PCSamplingData::remainingNumPcs

[r] Number of PCs available for collection

size_t CUpti_PCSamplingData::size

[w] Size of the data structure. CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are available in the structure. Used to preserve backward compatibility.

size_t CUpti_PCSamplingData::totalNumPcs

[r] Number of PCs collected

uint64_t CUpti_PCSamplingData::totalSamples

[r] Number of samples collected across all PCs. It includes samples for user modules, samples for non-user kernels and dropped samples. It includes counts for all non selected stall reasons. CUPTI does not provide PC records for non-user kernels. CUPTI does not provide PC records for instructions for which all selected stall reason metrics counts are zero.