NVTX C API Reference v3
NVIDIA Tools Extension Library
|
Go to the source code of this file.
Data Structures | |
union | nvtxMessageValue_t |
struct | nvtxEventAttributes_t |
Event Attribute Structure. . More... | |
union | nvtxEventAttributes_t::payload_t |
Payload assigned to this event.. More... | |
struct | nvtxResourceAttributes_t |
Resource Attribute Structure. . More... | |
union | nvtxResourceAttributes_t::identifier_t |
Identifier for the resource. . More... | |
Macros | |
#define | NVTX_VERSION 3 |
#define | NVTX_API |
#define | NVTX_INLINE_STATIC __inline__ static |
#define | NVTX_DECLSPEC NVTX_INLINE_STATIC |
#define | NVTX_VERSIONED_IDENTIFIER_L3(NAME, VERSION) NAME##_v##VERSION |
#define | NVTX_VERSIONED_IDENTIFIER_L2(NAME, VERSION) NVTX_VERSIONED_IDENTIFIER_L3(NAME, VERSION) |
#define | NVTX_VERSIONED_IDENTIFIER(NAME) NVTX_VERSIONED_IDENTIFIER_L2(NAME, NVTX_VERSION) |
#define | NVTX_SUCCESS 0 |
#define | NVTX_FAIL 1 |
#define | NVTX_ERR_INIT_LOAD_PROPERTY 2 |
#define | NVTX_ERR_INIT_ACCESS_LIBRARY 3 |
#define | NVTX_ERR_INIT_LOAD_LIBRARY 4 |
#define | NVTX_ERR_INIT_MISSING_LIBRARY_ENTRY_POINT 5 |
#define | NVTX_ERR_INIT_FAILED_LIBRARY_ENTRY_POINT 6 |
#define | NVTX_ERR_NO_INJECTION_LIBRARY_AVAILABLE 7 |
#define | NVTX_EVENT_ATTRIB_STRUCT_SIZE ( (uint16_t)( sizeof(nvtxEventAttributes_t) ) ) |
#define | NVTX_NO_PUSH_POP_TRACKING ((int)-2) |
#define | NVTX_IMPL_GUARD /* Ensure other headers cannot be included directly */ |
Typedefs | |
typedef uint64_t | nvtxRangeId_t |
typedef struct nvtxDomainRegistration_st | nvtxDomainRegistration |
typedef nvtxDomainRegistration * | nvtxDomainHandle_t |
typedef struct nvtxStringRegistration_st | nvtxStringRegistration |
typedef nvtxStringRegistration * | nvtxStringHandle_t |
Enumerations | |
enum | nvtxColorType_t { NVTX_COLOR_UNKNOWN = 0 , NVTX_COLOR_ARGB = 1 } |
enum | nvtxMessageType_t { NVTX_MESSAGE_UNKNOWN = 0 , NVTX_MESSAGE_TYPE_ASCII = 1 , NVTX_MESSAGE_TYPE_UNICODE = 2 , NVTX_MESSAGE_TYPE_REGISTERED = 3 } |
enum | nvtxPayloadType_t { NVTX_PAYLOAD_UNKNOWN = 0 , NVTX_PAYLOAD_TYPE_UNSIGNED_INT64 = 1 , NVTX_PAYLOAD_TYPE_INT64 = 2 , NVTX_PAYLOAD_TYPE_DOUBLE = 3 , NVTX_PAYLOAD_TYPE_UNSIGNED_INT32 = 4 , NVTX_PAYLOAD_TYPE_INT32 = 5 , NVTX_PAYLOAD_TYPE_FLOAT = 6 } |
Functions | |
NVTX_DECLSPEC void NVTX_API | nvtxInitialize (const void *reserved) |
Force initialization (optional) | |
Marker | |
NVTX_DECLSPEC void NVTX_API | nvtxDomainMarkEx (nvtxDomainHandle_t domain, const nvtxEventAttributes_t *eventAttrib) |
Marks an instantaneous event in the application. | |
NVTX_DECLSPEC void NVTX_API | nvtxMarkEx (const nvtxEventAttributes_t *eventAttrib) |
Marks an instantaneous event in the application. | |
NVTX_DECLSPEC void NVTX_API | nvtxMarkA (const char *message) |
Marks an instantaneous event in the application. | |
NVTX_DECLSPEC void NVTX_API | nvtxMarkW (const wchar_t *message) |
Process Ranges | |
NVTX_DECLSPEC nvtxRangeId_t NVTX_API | nvtxDomainRangeStartEx (nvtxDomainHandle_t domain, const nvtxEventAttributes_t *eventAttrib) |
Starts a process range in a domain. | |
NVTX_DECLSPEC nvtxRangeId_t NVTX_API | nvtxRangeStartEx (const nvtxEventAttributes_t *eventAttrib) |
Starts a process range. | |
NVTX_DECLSPEC nvtxRangeId_t NVTX_API | nvtxRangeStartA (const char *message) |
Starts a process range. | |
NVTX_DECLSPEC nvtxRangeId_t NVTX_API | nvtxRangeStartW (const wchar_t *message) |
NVTX_DECLSPEC void NVTX_API | nvtxDomainRangeEnd (nvtxDomainHandle_t domain, nvtxRangeId_t id) |
Ends a process range. | |
NVTX_DECLSPEC void NVTX_API | nvtxRangeEnd (nvtxRangeId_t id) |
Ends a process range. | |
Thread Ranges | |
NVTX_DECLSPEC int NVTX_API | nvtxDomainRangePushEx (nvtxDomainHandle_t domain, const nvtxEventAttributes_t *eventAttrib) |
Starts a nested thread range. | |
NVTX_DECLSPEC int NVTX_API | nvtxRangePushEx (const nvtxEventAttributes_t *eventAttrib) |
Starts a nested thread range. | |
NVTX_DECLSPEC int NVTX_API | nvtxRangePushA (const char *message) |
Starts a nested thread range. | |
NVTX_DECLSPEC int NVTX_API | nvtxRangePushW (const wchar_t *message) |
NVTX_DECLSPEC int NVTX_API | nvtxDomainRangePop (nvtxDomainHandle_t domain) |
Ends a nested thread range. | |
NVTX_DECLSPEC int NVTX_API | nvtxRangePop (void) |
Ends a nested thread range. | |
NVTX_DECLSPEC void NVTX_API | nvtxDomainResourceDestroy (nvtxResourceHandle_t resource) |
Destroy a resource object to track and associate data with OS and middleware objects. | |
Functions for NVTX Category Naming | |
NVTX_DECLSPEC void NVTX_API | nvtxDomainNameCategoryA (nvtxDomainHandle_t domain, uint32_t category, const char *name) |
Annotate an NVTX category used within a domain. | |
NVTX_DECLSPEC void NVTX_API | nvtxDomainNameCategoryW (nvtxDomainHandle_t domain, uint32_t category, const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxNameCategoryA (uint32_t category, const char *name) |
Annotate an NVTX category. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameCategoryW (uint32_t category, const wchar_t *name) |
Functions for OS Threads Naming | |
NVTX_DECLSPEC void NVTX_API | nvtxNameOsThreadA (uint32_t threadId, const char *name) |
Annotate an OS thread. | |
NVTX_DECLSPEC void NVTX_API | nvtxNameOsThreadW (uint32_t threadId, const wchar_t *name) |
NVTX_DECLSPEC nvtxStringHandle_t NVTX_API | nvtxDomainRegisterStringA (nvtxDomainHandle_t domain, const char *string) |
Register a string. | |
NVTX_DECLSPEC nvtxStringHandle_t NVTX_API | nvtxDomainRegisterStringW (nvtxDomainHandle_t domain, const wchar_t *string) |
NVTX_DECLSPEC nvtxDomainHandle_t NVTX_API | nvtxDomainCreateA (const char *name) |
Register a NVTX domain. | |
NVTX_DECLSPEC nvtxDomainHandle_t NVTX_API | nvtxDomainCreateW (const wchar_t *name) |
NVTX_DECLSPEC void NVTX_API | nvtxDomainDestroy (nvtxDomainHandle_t domain) |
Unregister a NVTX domain. | |
Functions for Generic Resource Naming | |
enum | nvtxResourceGenericType_t { NVTX_RESOURCE_TYPE_UNKNOWN = 0 , NVTX_RESOURCE_TYPE_GENERIC_POINTER = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 1) , NVTX_RESOURCE_TYPE_GENERIC_HANDLE = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 2) , NVTX_RESOURCE_TYPE_GENERIC_THREAD_NATIVE = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 3) , NVTX_RESOURCE_TYPE_GENERIC_THREAD_POSIX = NVTX_RESOURCE_MAKE_TYPE(GENERIC, 4) } |
Generic resource type for when a resource class is not available. More... | |
NVTX_DECLSPEC nvtxResourceHandle_t NVTX_API | nvtxDomainResourceCreate (nvtxDomainHandle_t domain, nvtxResourceAttributes_t *attribs) |
Create a resource object to track and associate data with OS and middleware objects. | |
#define NVTX_API |
Definition at line 173 of file nvToolsExt.h.
#define NVTX_DECLSPEC NVTX_INLINE_STATIC |
Definition at line 194 of file nvToolsExt.h.
#define NVTX_ERR_INIT_ACCESS_LIBRARY 3 |
Definition at line 238 of file nvToolsExt.h.
#define NVTX_ERR_INIT_FAILED_LIBRARY_ENTRY_POINT 6 |
Definition at line 241 of file nvToolsExt.h.
#define NVTX_ERR_INIT_LOAD_LIBRARY 4 |
Definition at line 239 of file nvToolsExt.h.
#define NVTX_ERR_INIT_LOAD_PROPERTY 2 |
Definition at line 237 of file nvToolsExt.h.
#define NVTX_ERR_INIT_MISSING_LIBRARY_ENTRY_POINT 5 |
Definition at line 240 of file nvToolsExt.h.
#define NVTX_ERR_NO_INJECTION_LIBRARY_AVAILABLE 7 |
Definition at line 242 of file nvToolsExt.h.
#define NVTX_EVENT_ATTRIB_STRUCT_SIZE ( (uint16_t)( sizeof(nvtxEventAttributes_t) ) ) |
Size of the nvtxEventAttributes_t structure.
Definition at line 247 of file nvToolsExt.h.
#define NVTX_FAIL 1 |
Definition at line 236 of file nvToolsExt.h.
#define NVTX_IMPL_GUARD /* Ensure other headers cannot be included directly */ |
Definition at line 1479 of file nvToolsExt.h.
#define NVTX_INLINE_STATIC __inline__ static |
Definition at line 177 of file nvToolsExt.h.
#define NVTX_NO_PUSH_POP_TRACKING ((int)-2) |
Definition at line 249 of file nvToolsExt.h.
#define NVTX_SUCCESS 0 |
The nvToolsExt library depends on stdint.h. If the build tool chain in use does not include stdint.h then define NVTX_STDINT_TYPES_ALREADY_DEFINED and define the following types:
#define NVTX_STDINT_TYPES_ALREADY_DEFINED if you are using your own header file. Result Codes
Definition at line 235 of file nvToolsExt.h.
#define NVTX_VERSION 3 |
Tools Extension API version
Definition at line 167 of file nvToolsExt.h.
#define NVTX_VERSIONED_IDENTIFIER | ( | NAME | ) | NVTX_VERSIONED_IDENTIFIER_L2(NAME, NVTX_VERSION) |
Definition at line 201 of file nvToolsExt.h.
#define NVTX_VERSIONED_IDENTIFIER_L2 | ( | NAME, | |
VERSION | |||
) | NVTX_VERSIONED_IDENTIFIER_L3(NAME, VERSION) |
Definition at line 200 of file nvToolsExt.h.
#define NVTX_VERSIONED_IDENTIFIER_L3 | ( | NAME, | |
VERSION | |||
) | NAME##_v##VERSION |
Definition at line 199 of file nvToolsExt.h.
typedef nvtxDomainRegistration* nvtxDomainHandle_t |
Definition at line 265 of file nvToolsExt.h.
typedef struct nvtxDomainRegistration_st nvtxDomainRegistration |
Definition at line 255 of file nvToolsExt.h.
typedef uint64_t nvtxRangeId_t |
Definition at line 251 of file nvToolsExt.h.
typedef nvtxStringRegistration* nvtxStringHandle_t |
Definition at line 279 of file nvToolsExt.h.
typedef struct nvtxStringRegistration_st nvtxStringRegistration |
Definition at line 269 of file nvToolsExt.h.
NVTX_DECLSPEC void NVTX_API nvtxInitialize | ( | const void * | reserved | ) |
Force initialization (optional)
Force NVTX library to initialize. The first call to any NVTX API function will automatically initialize the entire API. This can make the first call much slower than subsequent calls. In applications where the first call to NVTX may be in a performance-critical section, calling nvtxInitialize before any performance-critical sections will ensure NVTX initialization occurs at an acceptable time. Since nvtxInitialize takes no parameters and has no expected behavior besides initialization, it is convenient to add a call to nvtxInitialize in NVTX-instrumented applications that need to force earlier initialization without changing any other code. For example, if an app's first NVTX call is nvtxDomainCreate, and it is difficult to move that call earlier because the domain handle must be stored in an object only created at that point, adding a call to nvtxInitialize at the top of main() will ensure the later call to nvtxDomainCreate is as fast as possible.
reserved | - must be zero or NULL. |