#include "nvperfapi_common_types.h"
Go to the source code of this file.
NVPA_Status NVPA_CUDA_GetStackData | ( | const NVPA_StackData ** | ppStackData, | |
struct CUctx_st * | ctx | |||
) |
Returns the current CUDA context's current StackData.
The returned *ppStackData has its refcount incremented by 1. You must release the refcount by calling NVPA_StackData_Release(). Locked access is always enabled on the returned *ppStackData.
[out] | ppStackData | |
[in] | ctx | if NULL, the current CUDA context is used |
NVPA_Status NVPA_CUDA_PredictStackDataReady | ( | NVPA_Bool * | pIsReady, | |
struct CUctx_st * | ctx | |||
) |
Returns true if all metric values will be ready after the current pass has executed on the GPU.
This function predicts whether NVPA_StackData_IsReady() will return true after all graphics calls in the current pass have completed. Since GPUs execute asynchronously, the results will be delayed by several passes or graphical frames.
[out] | pIsReady | |
[in] | ctx | if NULL, the current CUDA context is used |
NVPA_Status NVPA_D3D11_GetStackData | ( | struct ID3D11DeviceContext * | pDeviceContext, | |
const NVPA_StackData ** | ppStackData | |||
) |
Returns pDeviceContext's current StackData.
The returned *ppStackData has its refcount incremented by 1. You must release the refcount by calling NVPA_StackData_Release(). Locked access is always enabled on the returned *ppStackData.
NVPA_Status NVPA_D3D11_PredictStackDataReady | ( | struct ID3D11DeviceContext * | pDeviceContext, | |
NVPA_Bool * | pIsReady | |||
) |
Returns true if all metric values will be ready after the current pass has executed on the GPU.
This function predicts whether NVPA_StackData_IsReady() will return true after all graphics calls in the current pass have completed. Since GPUs execute asynchronously, the results will be delayed by several passes or graphical frames.
[in] | pDeviceContext | |
[out] | pIsReady |
NVPA_Status NVPA_D3D12_Queue_GetStackData | ( | struct ID3D12CommandQueue * | pCommandQueue, | |
const NVPA_StackData ** | ppStackData | |||
) |
Returns pCommandQueue's current StackData.
The returned *ppStackData has its refcount incremented by 1. You must release the refcount by calling NVPA_StackData_Release(). Locked access is always enabled on the returned *ppStackData.
NVPA_Status NVPA_D3D12_Queue_PredictStackDataReady | ( | struct ID3D12CommandQueue * | pCommandQueue, | |
NVPA_Bool * | pIsReady | |||
) |
Returns true if all metric values will be ready after the current pass has executed on the GPU.
This function predicts whether NVPA_StackData_IsReady() will return true after all graphics calls in the current pass have completed. Since GPUs execute asynchronously, the results will be delayed by several passes or graphical frames.
[in] | pCommandQueue | |
[out] | pIsReady |
NVPA_Status NVPA_EGL_GetStackData | ( | const NVPA_StackData ** | ppStackData | ) |
Returns the current EGL context's current StackData.
There must be a current EGL context at the time of this call.
The returned *ppStackData has its refcount incremented by 1. You must release the refcount by calling NVPA_StackData_Release(). Locked access is always enabled on the returned *ppStackData.
NVPA_Status NVPA_EGL_PredictStackDataReady | ( | NVPA_Bool * | pIsReady | ) |
Returns true if all metric values will be ready after the current pass has executed on the GPU.
This function predicts whether NVPA_StackData_IsReady() will return true after all graphics calls in the current pass have completed. Since GPUs execute asynchronously, the results will be delayed by several passes or graphical frames.
There must be a current EGL context at the time of this call.
[out] | pIsReady |
NVPA_Status NVPA_OpenGL_GetStackData | ( | const NVPA_StackData ** | ppStackData | ) |
Returns the current GL context's current StackData.
There must be a current GL context at the time of this call.
The returned *ppStackData has its refcount incremented by 1. You must release the refcount by calling NVPA_StackData_Release(). Locked access is always enabled on the returned *ppStackData.
NVPA_Status NVPA_OpenGL_PredictStackDataReady | ( | NVPA_Bool * | pIsReady | ) |
Returns true if all metric values will be ready after the current pass has executed on the GPU.
This function predicts whether NVPA_StackData_IsReady() will return true after all graphics calls in the current pass have completed. Since GPUs execute asynchronously, the results will be delayed by several passes or graphical frames.
There must be a current GL context at the time of this call.
[out] | pIsReady |
NVPA_Status NVPA_StackData_AccumulateRangeData | ( | const NVPA_StackData * | pSource, | |
size_t | numSourceRangeIds, | |||
NVPA_RangeId * | pSourceRangeIds, | |||
NVPA_StackData * | pTarget | |||
) |
For each given range R in pSource, accumulates the metric values associated with each stack S containing R into a stack S' in pTarget. If S' does not already exist in pTarget, it is created. The stack IDs for S and S' are unrelated.
[in] | pSource | |
[in] | numSourceRangeIds | the number of ranges to copy; 0 indicates all ranges |
[in] | pSourceRangeIds | points to an array of numRangeIds elements |
[in] | pTarget | points to an NVPA_StackData object created fron pSource, or directly or indirectly from the same NVPA_StackData object that pSource was created from |
NVPA_Status NVPA_StackData_AccumulateStackDataIntoOriginalStacks | ( | const NVPA_StackData * | pSource, | |
size_t | numSourceStackIds, | |||
NVPA_StackId * | pSourceStackIds, | |||
NVPA_StackData * | pTarget | |||
) |
For each given stack S in pSource, accumulates the metric values associated with S into a stack S' in pTarget. If S' does not already exist in pTarget, it is created. The stack IDs for S and S' are unrelated.
[in] | pSource | |
[in] | numSourceStackIds | the number of stacks to copy; 0 indicates all stacks |
[in] | pSourceStackIds | points to an array of numStackIds elements |
[in] | pTarget | points to an NVPA_StackData object created fron pSource, or directly or indirectly from the same NVPA_StackData object that pSource was created from |
NVPA_Status NVPA_StackData_AccumulateStackDataIntoSingleStackId | ( | const NVPA_StackData * | pSource, | |
size_t | numSourceStackIds, | |||
NVPA_StackId * | pSourceStackIds, | |||
NVPA_StackData * | pTarget, | |||
NVPA_StackId | targetStackId | |||
) |
For each given stack S in pSource, accumulates the metric values associated with S into the stack with ID targetStackId in pTarget.
[in] | pSource | |
[in] | numSourceStackIds | the number of stacks to copy; 0 indicates all stacks |
[in] | pSourceStackIds | points to an array of numStackIds elements |
[in] | pTarget | points to an NVPA_StackData object created fron pSource, or directly or indirectly from the same NVPA_StackData object that pSource was created from |
[in] | targetStackId | the StackId in the target into which to copy the data; must already exist in pTarget |
NVPA_Status NVPA_StackData_Acquire | ( | const NVPA_StackData * | pStackData | ) |
Increments refcount on pStackData.
NVPA_Status NVPA_StackData_CreateStackData | ( | const NVPA_StackData * | pStackData, | |
const NVPA_StackDataOptions * | pStackDataOptions, | |||
NVPA_StackData ** | ppStackData | |||
) |
Creates a StackData object compatible with an existing StackData object.
[in] | pStackData | |
[in] | pStackDataOptions | |
[out] | ppStackData | Newly created NVPA_StackData objects have a refcount of 1. Release the refcount by calling NVPA_StackData_Release(). |
NVPA_Status NVPA_StackData_CreateStackId | ( | NVPA_StackData * | pStackData, | |
size_t | numRangeIds, | |||
NVPA_RangeId * | rangeIds, | |||
NVPA_StackId * | stackId | |||
) |
Creates a stack in pStackData that contains the given ranges, and returns its generated stack ID.
If the stack containing these ranges in this order already exists, that stack's ID is returned.
[in] | pStackData | |
[in] | numRangeIds | the number of ranges in the created stack; must not be 0 |
[in] | rangeIds | points to an array of numRangeIds elements |
[out] | stackId | the created StackId |
NVPA_Status NVPA_StackData_GetConfig | ( | const NVPA_StackData * | pStackData, | |
const NVPA_Config ** | ppConfig | |||
) |
Returns the StackData's Config.
Each StackData has exactly one Config for its entire lifetime.
The refcount on the returned *ppConfig is unaffected by this call.
NVPA_Status NVPA_StackData_GetMaxStackSize | ( | const NVPA_StackData * | pStackData, | |
size_t * | pMaxStackSize | |||
) |
Returns the max number of RangeIds in any range-stack.
[in] | pStackData | |
[out] | pMaxStackSize |
NVPA_Status NVPA_StackData_GetMetricValues | ( | const NVPA_StackData * | pStackData, | |
NVPA_StackId | stackId, | |||
size_t | numValues, | |||
double * | pValues, | |||
uint32_t * | pValueErrors, | |||
size_t * | pNumValues | |||
) |
Returns a GPU-level value for each enabled metric, for the specified stackId.
[in] | pStackData | |
[in] | stackId | |
[in] | numValues | |
[out] | pValues | points to an array of numValues elements |
[out] | pValueErrors | may be NULL; points to an array of NVPA_Config_GetNumEnabledMetrics() elements; each element is a NVPA_MetricValueError |
[out] | pNumValues | may be NULL; the number of values written to pValues and pValueErrors |
NVPA_Status NVPA_StackData_GetNumStackIds | ( | const NVPA_StackData * | pStackData, | |
size_t * | pNumStacks | |||
) |
Returns the number of observed StackIds that have collected data associated with them. That is, some StackIds may be excluded if they do not have data associated with them; this may happen when a stack covers a portion of the program within which no metric-relevant work is executed.
[in] | pStackData | |
[out] | pNumStacks |
NVPA_Status NVPA_StackData_GetRangeIds | ( | const NVPA_StackData * | pStackData, | |
NVPA_StackId | stackId, | |||
size_t | numRangeIds, | |||
NVPA_RangeId * | pRangeIds, | |||
size_t * | pNumRangeIds | |||
) |
Returns the RangeIds for the specified range-stack.
[in] | pStackData | |
[in] | stackId | 1 <= stackId < NVPA_StackData_GetNumStackIds() |
[in] | numRangeIds | |
[out] | pRangeIds | points to an array of numRangeIds elements |
[out] | pNumRangeIds | may be NULL; the number of RangeIds written to pRangeIds |
NVPA_Status NVPA_StackData_GetStackIds | ( | const NVPA_StackData * | pStackData, | |
size_t | numStackIds, | |||
NVPA_StackId * | pStackIds, | |||
size_t * | pNumStackIds | |||
) |
Returns the StackId of each observed range-stack that has collected data associated with it.
Note that the number of StackIds may change between the last call to NVPA_StackData_GetNumStackIds and this call. If the number of existent stackIds is less than numStackIds, remaining elements will be assigned to zero.
[in] | pStackData | |
[in] | numStackIds | |
[out] | pStackIds | points to an array of numStackIds elements |
[out] | pNumStackIds | may be NULL; the number of StackIds written to pStackIds |
NVPA_Status NVPA_StackData_IsReady | ( | const NVPA_StackData * | pStackData, | |
NVPA_Bool * | pIsReady | |||
) |
Returns true if all metric values are ready to be queried.
[in] | pStackData | |
[out] | pIsReady |
NVPA_Status NVPA_StackData_Release | ( | const NVPA_StackData * | pStackData | ) |
Decrements refcount on pStackData.
When an object's refcount reaches 0, it is destroyed.
NVPA_Status NVPA_StackDataOptions_Create | ( | NVPA_StackDataOptions ** | ppStackDataOptions | ) |
Creates an StackDataOptions object.
Each option is initially set to its default value.
NVPA_Status NVPA_StackDataOptions_Destroy | ( | NVPA_StackDataOptions * | pStackDataOptions | ) |
Destroys an StackDataOptions object.
NVPA_Status NVPA_StackDataOptions_SetLockedAccess | ( | NVPA_StackDataOptions * | pStackDataOptions, | |
NVPA_Bool | lockedAccess | |||
) |
Sets flag for whether to use mutex locks when accessing this object.
The default value is false.
If false, calls using this object will not lock a mutex before accessing it. Use this when you do not intend to access the object from multiple threads, or wish to use your own synchronization scheme.
If true, calls using this object will lock a mutex before accessing it.