nvperfapi_common_types.h File Reference

#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.


Typedefs

typedef struct NVPA_SampleCallbacks NVPA_SampleCallbacks

Common Types

enum  NVPA_Status {
  NVPA_STATUS_SUCCESS = 0, NVPA_STATUS_ERROR = 1, NVPA_STATUS_INTERNAL_ERROR = 2, NVPA_STATUS_NOT_INITIALIZED = 3,
  NVPA_STATUS_NOT_LOADED = 4, NVPA_STATUS_FUNCTION_NOT_FOUND = 5, NVPA_STATUS_NOT_SUPPORTED = 6, NVPA_STATUS_NOT_IMPLEMENTED = 7,
  NVPA_STATUS_INVALID_ARGUMENT = 8, NVPA_STATUS_INVALID_METRIC_ID = 9, NVPA_STATUS_DRIVER_NOT_LOADED = 10, NVPA_STATUS_OUT_OF_MEMORY = 11,
  NVPA_STATUS_INVALID_THREAD_STATE = 12, NVPA_STATUS_FAILED_CONTEXT_ALLOC = 13, NVPA_STATUS_UNSUPPORTED_GPU = 14, NVPA_STATUS_INSUFFICIENT_DRIVER_VERSION = 15,
  NVPA_STATUS_OBJECT_NOT_REGISTERED = 16, NVPA_STATUS_INSUFFICIENT_PRIVILEGE = 17, NVPA_STATUS_INVALID_CONTEXT_STATE = 18, NVPA_STATUS_INVALID_OBJECT_STATE = 19,
  NVPA_STATUS_RESOURCE_UNAVAILABLE = 20, NVPA_STATUS_DRIVER_LOADED_TOO_LATE = 21, NVPA_STATUS_INSUFFICIENT_SPACE = 22, NVPA_STATUS_OBJECT_MISMATCH = 23,
  NVPA_STATUS__COUNT
}
enum  NVPA_ActivityKind { NVPA_ACTIVITY_KIND_INVALID = 0, NVPA_ACTIVITY_KIND_PROFILER, NVPA_ACTIVITY_KIND_REALTIME_SAMPLED, NVPA_ACTIVITY_KIND__COUNT }
enum  NVPA_MetricEnableError {
  NVPA_METRIC_ENABLE_ERROR_NONE = 0, NVPA_METRIC_ENABLE_ERROR_UNKNOWN = 1, NVPA_METRIC_ENABLE_ERROR_TOO_MANY_PASSES = 2, NVPA_METRIC_ENABLE_ERROR_NOT_IMPLEMENTED = 3,
  NVPA_METRIC_ENABLE_ERROR__COUNT
}
enum  NVPA_MetricValueError {
  NVPA_METRIC_VALUE_ERROR_NONE = 0, NVPA_METRIC_VALUE_ERROR_UNINITIALIZED = 1000, NVPA_METRIC_VALUE_ERROR_INVALID = 2000, NVPA_METRIC_VALUE_ERROR_OUT_OF_MEMORY = 2500,
  NVPA_METRIC_VALUE_ERROR_OVERFLOWED = 3000, NVPA_METRIC_VALUE_ERROR_DIVIDE_BY_ZERO = 4000, NVPA_METRIC_VALUE_ERROR_NOT_AVAILABLE = 5000, NVPA_METRIC_VALUE_ERROR_NOT_READY = 6000,
  NVPA_METRIC_VALUE_ERROR_NOT_PERMITTED = 7000, NVPA_METRIC_VALUE_ERROR_MIN_MAX_NOT_COLLECTIBLE = 8000
}
enum  NVPA_GpuEventHandlingResult {
  NVPA_GPU_EVENT_HANDLING_RESULT_NONE = 0, NVPA_GPU_EVENT_HANDLING_RESULT_REACHED_REQUESTED_EVENTS = 1, NVPA_GPU_EVENT_HANDLING_RESULT_TIME_OUT = 2, NVPA_GPU_EVENT_HANDLING_RESULT_SESSION_ENDED = 3,
  NVPA_GPU_EVENT_HANDLING_RESULT__COUNT
}
typedef uint8_t NVPA_Bool
typedef int32_t NVPA_StackId
typedef intptr_t NVPA_RangeId
typedef uint32_t NVPA_MetricId

Detailed Description


Typedef Documentation

typedef uint8_t NVPA_Bool

The type used for boolean values.

typedef uint32_t NVPA_MetricId

The type used for metric IDs.

typedef intptr_t NVPA_RangeId

The type used for range IDs.

typedef int32_t NVPA_StackId

The type used for stack IDs.


Enumeration Type Documentation

The configuration's activity-kind dictates which types of data may be collected.

Enumerator:
NVPA_ACTIVITY_KIND_INVALID  Invalid value.
NVPA_ACTIVITY_KIND_PROFILER  A workload-centric activity for serialized and pipelined collection.

Profiler is capable of collecting both serialized and pipelined metrics. The library introduces any synchronization required to collect serialized metrics.

NVPA_ACTIVITY_KIND_REALTIME_SAMPLED  A realtime activity for sampling counters from the CPU or GPU.
NVPA_ACTIVITY_KIND__COUNT  The number of supported activities.

Error codes explaining which condition passed to NVPA_D3D12_Queue_HandleProfilerEvents has been reached.

Enumerator:
NVPA_GPU_EVENT_HANDLING_RESULT_NONE  No error.
NVPA_GPU_EVENT_HANDLING_RESULT_REACHED_REQUESTED_EVENTS  The requested number of events have been handled
NVPA_GPU_EVENT_HANDLING_RESULT_TIME_OUT  The requested timeout has been reached
NVPA_GPU_EVENT_HANDLING_RESULT_SESSION_ENDED  EndSession has been called and all events are handled
NVPA_GPU_EVENT_HANDLING_RESULT__COUNT  The number of enumerators in this enumeration.

Error codes explaining why a metric failed to Enable.

See also:
NVPA_Activity_EnableMetric()
Enumerator:
NVPA_METRIC_ENABLE_ERROR_NONE  There is no reason why the metric cannot be enabled.
NVPA_METRIC_ENABLE_ERROR_UNKNOWN  The metric cannot be enabled, but the reason is not specified.
NVPA_METRIC_ENABLE_ERROR_TOO_MANY_PASSES  Enabling the metric would cause the number of collection passes to exceed the value set in a previous call to NVPA_SetMaxPassCount().
NVPA_METRIC_ENABLE_ERROR_NOT_IMPLEMENTED  Enabling the metric is not yet implemented.
NVPA_METRIC_ENABLE_ERROR__COUNT  The number of enumerators in this enumeration.

Error codes explaining why a metric value was not returned.

Since many metrics are implemented in terms of other metrics, only the most severe error is reported for a given metric. The errors below are listed in increasing order of severity.

Enumerator:
NVPA_METRIC_VALUE_ERROR_NONE  No error.
NVPA_METRIC_VALUE_ERROR_UNINITIALIZED  No values were collected.
NVPA_METRIC_VALUE_ERROR_INVALID  A general error occurred during collection.
NVPA_METRIC_VALUE_ERROR_OUT_OF_MEMORY  During collection, the system ran out of memory.
NVPA_METRIC_VALUE_ERROR_OVERFLOWED  One or more counter values overflowed.
NVPA_METRIC_VALUE_ERROR_DIVIDE_BY_ZERO  A divide-by-zero occurred during the metric's computation.
NVPA_METRIC_VALUE_ERROR_NOT_AVAILABLE  The value is not available, and never will be.
NVPA_METRIC_VALUE_ERROR_NOT_READY  The value will be available after more passes have been collected.
NVPA_METRIC_VALUE_ERROR_NOT_PERMITTED  The value cannot be shown under the current permissions.
NVPA_METRIC_VALUE_ERROR_MIN_MAX_NOT_COLLECTIBLE  The value cannot be collected, because it comes from a min or max metric collected across a split range. To fix this, try collecting this value across multiple different ranges, or within a single non-split range.

Error codes.

Enumerator:
NVPA_STATUS_SUCCESS  Success
NVPA_STATUS_ERROR  Generic error.
NVPA_STATUS_INTERNAL_ERROR  Internal error. Please file a bug!
NVPA_STATUS_NOT_INITIALIZED  NVPA_Init() has not been called yet.
NVPA_STATUS_NOT_LOADED  The NvPerfAPI DLL/DSO could not be loaded during init.
NVPA_STATUS_FUNCTION_NOT_FOUND  The function was not found in this version of the NvPerfAPI DLL/DSO.
NVPA_STATUS_NOT_SUPPORTED  The request is intentionally not supported by NvPerfAPI.
NVPA_STATUS_NOT_IMPLEMENTED  The request is not implemented by this version of NvPerfAPI.
NVPA_STATUS_INVALID_ARGUMENT  Invalid argument.
NVPA_STATUS_INVALID_METRIC_ID  A MetricId argument does not belong to the specified NVPA_Activity or NVPA_Config.
NVPA_STATUS_DRIVER_NOT_LOADED  No driver has been loaded via NVPA_*_LoadDriver().
NVPA_STATUS_OUT_OF_MEMORY  Failed memory allocation.
NVPA_STATUS_INVALID_THREAD_STATE  The request could not be fulfilled due to the state of the current thread.
NVPA_STATUS_FAILED_CONTEXT_ALLOC  Allocation of context object failed.
NVPA_STATUS_UNSUPPORTED_GPU  The specified GPU is not supported.
NVPA_STATUS_INSUFFICIENT_DRIVER_VERSION  The installed NVIDIA driver is too old.
NVPA_STATUS_OBJECT_NOT_REGISTERED  Graphics object has not been registered via NVPA_Register*().
NVPA_STATUS_INSUFFICIENT_PRIVILEGE  The operation failed due to a security check.
NVPA_STATUS_INVALID_CONTEXT_STATE  The request could not be fulfilled due to the state of the context.
NVPA_STATUS_INVALID_OBJECT_STATE  The request could not be fulfilled due to the state of the object.
NVPA_STATUS_RESOURCE_UNAVAILABLE  The request could not be fulfilled because a system resource is already in use.
NVPA_STATUS_DRIVER_LOADED_TOO_LATE  The NVPA_*_LoadDriver() is called after the context, command queue or device is created.
NVPA_STATUS_INSUFFICIENT_SPACE  The provided buffer is not large enough.
NVPA_STATUS_OBJECT_MISMATCH  The API object passed to NVPA_[API]_BeginPass/NVPA_[API]_EndPass and NVPA_[API]_PushRange/NVPA_[API]_PopRange does not match with the NVPA_[API]_BeginSession.
NVPA_STATUS__COUNT  The number of enumerators in this enumeration.


NVIDIA(R) PerfWorks SDK Documentation (c) 2015-2016. NVIDIA Corporation. All Rights Reserved.