Error and result codes returned by CUPTI PC sampling utility API.
PC_SAMPLING_BUFFER_INVALID | Invalid buffer type. |
PC_SAMPLING_BUFFER_PC_TO_COUNTER_DATA | Refers to CUpti_PCSamplingData buffer. |
CUptiUtilResult CUPTIUTILAPI CUPTI::PcSamplingUtil::CuptiUtilGetBufferInfo | ( | CUptiUtil_GetBufferInfoParams * | pParams | ) |
This API must be called every time before calling CuptiUtilGetPcSampData API. BufferInfo structure, it gives info about recordCount and stallReasonCount of every record in the buffer. This will help to allocate exact buffer to retrieve data into it.
CUPTI_UTIL_SUCCESS | ||
CUPTI_UTIL_ERROR_INVALID_PARAMETER | error out if either of pParam or fileHandle is NULL or param struct size is incorrect. | |
CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED | file handle is not in good state to read data from file. | |
CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED | failed to read data from file. |
CUptiUtilResult CUPTIUTILAPI CUPTI::PcSamplingUtil::CuptiUtilGetHeaderData | ( | CUptiUtil_GetHeaderDataParams * | pParams | ) |
This API must be called once initially while retrieving data from file. Header structure, it gives info about total number of buffers present in the file.
CUPTI_UTIL_SUCCESS | ||
CUPTI_UTIL_ERROR_INVALID_PARAMETER | error out if either of pParam or fileHandle is NULL or param struct size is incorrect. | |
CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED | file handle is not in good state to read data from file | |
CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED | failed to read data from file. |
CUptiUtilResult CUPTIUTILAPI CUPTI::PcSamplingUtil::CuptiUtilGetPcSampData | ( | CUptiUtil_GetPcSampDataParams * | pParams | ) |
This API must be called after CuptiUtilGetBufferInfo API. It will retrieve data from file into allocated buffer.
CUPTI_UTIL_SUCCESS | ||
CUPTI_UTIL_ERROR_INVALID_PARAMETER | error out if buffer type is invalid or if either of pSampData, pParams is NULL. If pPcSamplingStallReasons is not NULL then error out if either of stallReasonIndex, stallReasons or stallReasons array element pointer is NULL. or filename is empty. | |
CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED | ||
CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED | file handle is not in good state to read data from file. |
CUptiUtilResult CUPTIUTILAPI CUPTI::PcSamplingUtil::CuptiUtilMergePcSampData | ( | CUptiUtil_MergePcSampDataParams * | pParams | ) |
This API merge PC sampling data range id wise. It allocates memory for merged data and fill data in it and provide buffer pointer in MergedPcSampDataBuffers field. It is expected from user to free merge data buffers after use.
CUPTI_UTIL_SUCCESS | ||
CUPTI_UTIL_ERROR_INVALID_PARAMETER | error out if param struct size is invalid or count of buffers to merge is invalid i.e less than 1 or either of PcSampDataBuffer, MergedPcSampDataBuffers, numMergedBuffer is NULL | |
CUPTI_UTIL_ERROR_OUT_OF_MEMORY | Unable to allocate memory for merged buffer. |
CUptiUtilResult CUPTIUTILAPI CUPTI::PcSamplingUtil::CuptiUtilPutPcSampData | ( | CUptiUtil_PutPcSampDataParams * | pParams | ) |
This API can be called multiple times. It will append buffer in the file. For every buffer it will store BufferInfo so that before retrieving data it will help to allocate buffer to store retrieved data. This API creates file if file does not present. If stallReasonIndex or stallReasons pointer of CUptiUtil_PutPcSampDataParams is NULL then stall reasons data will not be stored in file. It is expected to store all available stall reason data at least once to refer it during offline correlation.
CUPTI_UTIL_SUCCESS | ||
CUPTI_UTIL_ERROR_INVALID_PARAMETER | error out if buffer type is invalid or if either of pSamplingData, pParams pointer is NULL or stall reason configuration details not provided or filename is empty. | |
CUPTI_UTIL_ERROR_UNABLE_TO_CREATE_FILE | ||
CUPTI_UTIL_ERROR_UNABLE_TO_OPEN_FILE | ||
CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED |