|
NVTX C API Reference v3
NVIDIA Tools Extension Library
|
NVTX payload extension API: schema types, entry flags, and registration. More...


Go to the source code of this file.
Data Structures | |
| struct | nvtxPayloadEntryTypeInfo_t |
| Size and alignment information for predefined payload entry types. More... | |
| struct | nvtxPayloadData_t |
| Binary payload data, size and decoding information. More... | |
| struct | nvtxSemanticsHeader_t |
| Header of the payload entry's semantic field. More... | |
| struct | nvtxPayloadSchemaEntry_t |
| Entry in a schema. More... | |
| struct | nvtxPayloadSchemaAttr_t |
| NVTX payload schema attributes. More... | |
| struct | nvtxPayloadEnum_t |
| Description of one enumeration value. More... | |
| struct | nvtxPayloadEnumAttr_t |
| NVTX payload enumeration type attributes. More... | |
| struct | nvtxScopeAttr_t |
| struct | nvtxTimeDomainAttr_t |
| struct | nvtxSyncPoint_t |
| A pair of timestamps taken at the same instant in two different time domains. Used with nvtxTimeSyncPointTable. More... | |
| struct | nvtxEventBatch_t |
| Helper struct to submit a batch of events (marks or ranges). More... | |
Functions | |
| NVTX_DECLSPEC uint64_t NVTX_API | nvtxPayloadSchemaRegister (nvtxDomainHandle_t domain, const nvtxPayloadSchemaAttr_t *attr) |
| Register a payload schema. | |
| NVTX_DECLSPEC uint64_t NVTX_API | nvtxPayloadEnumRegister (nvtxDomainHandle_t domain, const nvtxPayloadEnumAttr_t *attr) |
| Register an enumeration type with the payload extension. | |
| NVTX_DECLSPEC uint64_t NVTX_API | nvtxScopeRegister (nvtxDomainHandle_t domain, const nvtxScopeAttr_t *attr) |
| Register a scope. | |
| NVTX_DECLSPEC void NVTX_API | nvtxMarkPayload (nvtxDomainHandle_t domain, const nvtxPayloadData_t *payloadData, size_t count) |
| Marks an instantaneous event in the application with the attributes being passed via the extended payload. | |
| NVTX_DECLSPEC int NVTX_API | nvtxRangePushPayload (nvtxDomainHandle_t domain, const nvtxPayloadData_t *payloadData, size_t count) |
| Begin a nested thread range with the attributes being passed via the payload. | |
| NVTX_DECLSPEC int NVTX_API | nvtxRangePopPayload (nvtxDomainHandle_t domain, const nvtxPayloadData_t *payloadData, size_t count) |
| End a nested thread range with an additional custom payload. | |
| NVTX_DECLSPEC nvtxRangeId_t NVTX_API | nvtxRangeStartPayload (nvtxDomainHandle_t domain, const nvtxPayloadData_t *payloadData, size_t count) |
| Start a thread range with attributes passed via the extended payload. | |
| NVTX_DECLSPEC void NVTX_API | nvtxRangeEndPayload (nvtxDomainHandle_t domain, nvtxRangeId_t id, const nvtxPayloadData_t *payloadData, size_t count) |
| End a thread range and pass a custom payload. | |
| NVTX_DECLSPEC uint8_t NVTX_API | nvtxDomainIsEnabled (nvtxDomainHandle_t domain) |
| Checks if the given NVTX domain is enabled. | |
| NVTX_DECLSPEC int64_t NVTX_API | nvtxTimestampGet (void) |
| NVTX_DECLSPEC uint64_t NVTX_API | nvtxTimeDomainRegister (nvtxDomainHandle_t domain, const nvtxTimeDomainAttr_t *timeAttr) |
| NVTX_DECLSPEC void NVTX_API | nvtxTimerSource (nvtxDomainHandle_t domain, uint64_t timeDomainId, uint64_t flags, int64_t(*timestampProviderFn)(void)) |
| NVTX_DECLSPEC void NVTX_API | nvtxTimerSourceWithData (nvtxDomainHandle_t domain, uint64_t timeDomainId, uint64_t flags, int64_t(*timestampProviderFn)(void *data), void *data) |
| NVTX_DECLSPEC void NVTX_API | nvtxTimeSyncPoint (nvtxDomainHandle_t domain, uint64_t timeDomainId1, uint64_t timeDomainId2, int64_t timestamp1, int64_t timestamp2) |
| NVTX_DECLSPEC void NVTX_API | nvtxTimeSyncPointTable (nvtxDomainHandle_t domain, uint64_t timeDomainIdSrc, uint64_t timeDomainIdDst, const nvtxSyncPoint_t *syncPoints, size_t count) |
| NVTX_DECLSPEC void NVTX_API | nvtxTimestampConversionFactor (nvtxDomainHandle_t domain, uint64_t timeDomainIdSrc, uint64_t timeDomainIdDst, double slope, int64_t timestampSrc, int64_t timestampDst) |
| Pass a conversion factor between two time domains to the NVTX handler. | |
| NVTX_DECLSPEC void NVTX_API | nvtxEventSubmit (nvtxDomainHandle_t domain, const nvtxPayloadData_t *payloadData, size_t numPayloads) |
| Submit one deferred event. | |
| NVTX_DECLSPEC void NVTX_API | nvtxEventBatchSubmit (nvtxDomainHandle_t domain, const nvtxEventBatch_t *eventBatch) |
| Submit a batch of deferred events in the given domain. | |
NVTX payload extension API: schema types, entry flags, and registration.
Extended payloads allow arbitrary structured data to be attached to NVTX mark and range events. A registered schema describes how tools decode payload bytes.
Workflow:
For detailed concepts, full workflow, and example usage, see Extended Payloads: User Guide.
Definition in file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxDomainIsEnabled 7 |
Definition at line 1612 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxEventBatchSubmit 17 |
Definition at line 1628 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxEventSubmit 16 |
Definition at line 1627 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxMarkPayload 2 |
Definition at line 1607 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxPayloadEnumRegister 1 |
Definition at line 1606 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxPayloadSchemaRegister 0 |
Definition at line 1605 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxRangeEndPayload 6 |
Definition at line 1611 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxRangePopPayload 4 |
Definition at line 1609 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxRangePushPayload 3 |
Definition at line 1608 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxRangeStartPayload 5 |
Definition at line 1610 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxScopeRegister 12 |
Definition at line 1613 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxTimeDomainRegister 9 |
Definition at line 1621 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxTimerSource 10 |
Definition at line 1622 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxTimerSourceWithData 11 |
Definition at line 1623 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxTimestampConversionFactor 15 |
Definition at line 1626 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxTimestampGet 8 |
Definition at line 1620 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxTimeSyncPoint 13 |
Definition at line 1624 of file nvToolsExtPayload.h.
| #define NVTX3EXT_CBID_nvtxTimeSyncPointTable 14 |
Definition at line 1625 of file nvToolsExtPayload.h.
| #define NVTX_BATCH_FLAG_TIME_SORTED 0 |
Timestamp ordering flags for a batch of deferred events or counters. By default, chronological order by the first timestamp of the event or counter is assumed.
Definition at line 750 of file nvToolsExtPayload.h.
| #define NVTX_BATCH_FLAG_TIME_SORTED_PARTIALLY (1 << 1) |
Definition at line 751 of file nvToolsExtPayload.h.
| #define NVTX_BATCH_FLAG_TIME_SORTED_PER_SCOPE (2 << 1) |
Definition at line 752 of file nvToolsExtPayload.h.
| #define NVTX_BATCH_FLAG_UNSORTED (3 << 1) |
Definition at line 753 of file nvToolsExtPayload.h.
| #define NVTX_BATCH_FLAGS_V1 |
Definition at line 743 of file nvToolsExtPayload.h.
| #define NVTX_EXT_IMPL_PAYLOAD_GUARD |
Definition at line 1761 of file nvToolsExtPayload.h.
| #define NVTX_EXT_PAYLOAD_COMPATID 0x0104 |
The compatibility ID is used for versioning of this extension.
If needed, semantic extension headers can be included after this header.
Definition at line 62 of file nvToolsExtPayload.h.
| #define NVTX_EXT_PAYLOAD_MODULEID 2 |
Unique module ID identifying the payload extension.
Definition at line 69 of file nvToolsExtPayload.h.
| #define NVTX_EXT_PAYLOAD_VERSIONED_ID | ( | NAME | ) | NVTX_EXT_PAYLOAD_VERSIONED_IDENTIFIER_L2(NAME, NVTX_VERSION, NVTX_EXT_PAYLOAD_COMPATID) |
Definition at line 1747 of file nvToolsExtPayload.h.
| #define NVTX_EXT_PAYLOAD_VERSIONED_IDENTIFIER_L2 | ( | NAME, | |
| VERSION, | |||
| COMPATID | |||
| ) | NVTX_EXT_PAYLOAD_VERSIONED_IDENTIFIER_L3(NAME, VERSION, COMPATID) |
Definition at line 1745 of file nvToolsExtPayload.h.
| #define NVTX_EXT_PAYLOAD_VERSIONED_IDENTIFIER_L3 | ( | NAME, | |
| VERSION, | |||
| COMPATID | |||
| ) | NAME##_v##VERSION##_bpl##COMPATID |
Definition at line 1743 of file nvToolsExtPayload.h.
| #define NVTX_EXT_PAYLOAD_VERSIONED_IDENTIFIERS_V1 |
Definition at line 1742 of file nvToolsExtPayload.h.
| #define NVTX_EXT_TYPES_GUARD |
Definition at line 1756 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_API_FUNCTIONS_DEFERRED_V1 |
Definition at line 1453 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_API_FUNCTIONS_V1 |
Definition at line 1310 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_CALLBACK_ID_DEFERRED_V1 |
Definition at line 1618 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_CALLBACK_ID_V1 |
Callback IDs of API functions in the payload extension.
The NVTX handler can use these values to register a handler function. When InitializeInjectionNvtxExtension(nvtxExtModuleInfo_t* moduleInfo) is executed, a handler routine can be registered as follows:
Definition at line 1603 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_ARRAY_FIXED_SIZE (1 << 4) |
The value is an array with fixed length set by arrayOrUnionDetail.
Definition at line 105 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_ARRAY_LENGTH_INDEX (3 << 4) |
A single or multi-dimensional array of variable length.
The field arrayOrUnionDetail contains the index of the schema entry that holds the length(s). If the length entry is a scalar, then this entry is a 1D array. If the length entry is a fixed-size array, then the number of dimensions is defined with the registration of the schema. If the length entry is a zero-terminated array, then the array of the dimensions can be determined at runtime. For multidimensional arrays, values are stored in row-major order, with rows being stored consecutively in contiguous memory. The size of the entry (in bytes) is the product of the dimensions multiplied by the size of the array element.
The referenced length entry must appear before this entry in the schema's entries array and must be of an integer type. For signed integer length entries, negative values are treated as zero (resulting in a zero-length array).
Definition at line 130 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_ARRAY_LENGTH_PAYLOAD_INDEX (4 << 4) |
A single or multi-dimensional array of variable length, where the dimensions are stored in a different payload (index) of the same event.
arrayOrUnionDetail contains the zero-based payload index (into the nvtxPayloadData_t array of the event) of a separate payload whose single entry holds the array length(s). The referenced payload is decoded as an integer (1D) or integer array (multi-dimensional, row-major).
This enables an existing array to be passed as payload data, while the array dimensions are defined in a separate payload with only one payload entry.
Definition at line 144 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_ARRAY_TYPE | ( | F | ) | ((F) & NVTX_PAYLOAD_ENTRY_FLAG_IS_ARRAY) |
Definition at line 220 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_ARRAY_ZERO_TERMINATED (2 << 4) |
A zero-terminated array. The terminator is an element whose bytes are all zero.
Definition at line 110 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_COUNTER (4 << 12) |
Definition at line 202 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_DEEP_COPY (1 << 8) |
The value or data that is pointed to by this payload entry value shall be copied by the NVTX handler.
A tool that does not support deep copy may retain only the address value; in that case, the referenced data is unavailable for interpretation. See NVTX_PAYLOAD_SCHEMA_FLAG_DEEP_COPY for more details.
Definition at line 154 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_EVENT_MESSAGE (1 << 10) |
The entry specifies the event message. Any string type can be used.
If multiple messages are specified for a logical event, the effective message is selected according to NVTX_PAYLOAD_EVENT_ATTRIBUTE_PRECEDENCE.
Definition at line 167 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_HIDE (1 << 9) |
Notifies the NVTX handler to hide this entry in case of visualization.
Definition at line 159 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_IS_ARRAY |
NVTX_PAYLOAD_SCHEMA_TYPE_* this entry is enclosed. For instance, variable length embedded arrays are valid within NVTX_PAYLOAD_SCHEMA_TYPE_DYNAMIC but invalid with NVTX_PAYLOAD_SCHEMA_TYPE_STATIC. See NVTX_PAYLOAD_SCHEMA_TYPE_* for additional details. Definition at line 215 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_MARK (3 << 12) |
Definition at line 201 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_OFFSET_FROM_BASE (1 << 2) |
Offset from base address of the payload.
Definition at line 95 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_OFFSET_FROM_HERE (1 << 3) |
Offset from the end of this payload entry.
Definition at line 100 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_POINTER (1 << 1) |
Absolute pointer into a payload (entry) of the same event.
Definition at line 90 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_RANGE_BEGIN (1 << 12) |
Flags that assign an event-type role to an entry.
These flags let a tool identify which entries carry special event semantics (e.g. timestamps for range begin/end, counter values). They work in conjunction with the schema-level flags NVTX_PAYLOAD_SCHEMA_FLAG_*:
NVTX_PAYLOAD_SCHEMA_FLAG_RANGE_PUSHPOP or _RANGE_STARTEND: the schema represents a range. Use the entry flags RANGE_BEGIN and RANGE_END on timestamp entries to mark start and end time.NVTX_PAYLOAD_SCHEMA_FLAG_MARK: the schema represents an instantaneous marker. Use NVTX_PAYLOAD_ENTRY_FLAG_MARK on a timestamp entry.NVTX_PAYLOAD_SCHEMA_FLAG_COUNTER_GROUP: the schema represents a group of counters. Use NVTX_PAYLOAD_ENTRY_FLAG_COUNTER on each value entry that is a counter. Counter semantics (normalization, limits, interpolation) can be further described via the entry's nvtxPayloadSchemaEntry_t::semantics field. For counter registration and sampling, use nvtx3/nvToolsExtCounters.h.For ranges and marks, use NVTX_PAYLOAD_ENTRY_FLAG_EVENT_MESSAGE on a string entry to provide the event's display name.
Definition at line 199 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_RANGE_END (2 << 12) |
Definition at line 200 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_TIMESTAMP (2 << 10) |
The entry contains a timestamp.
The time source might be provided via the entry semantics field. In most cases, the timestamp (entry) type is NVTX_PAYLOAD_ENTRY_TYPE_INT64.
Definition at line 175 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAG_UNUSED 0 |
Definition at line 85 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_FLAGS_V1 |
Definition at line 83 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_ADDRESS 23 |
Any address, e.g. void*. If the pointee type matters, use NVTX_PAYLOAD_ENTRY_FLAG_POINTER with the pointee type instead.
Definition at line 305 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_BF16 50 /* bfloat16 (16-bit) */ |
Definition at line 345 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_BYTE 32 |
Store raw 8-bit binary data. As with char, 1-byte alignment is assumed. Typically, a tool will display this as hex or binary.
Definition at line 324 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_CATEGORY 68 /* uint32_t */ |
Data types are as defined by NVTXv3 core.
Entries of these types are interpreted as event attributes.
Definition at line 353 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_CHAR 1 |
Basic integer types.
Definition at line 266 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_CHAR16 26 |
Definition at line 312 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_CHAR32 27 |
Definition at line 313 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_CHAR8 25 /* since C2x and C++20 */ |
Definition at line 311 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_COLOR_ARGB 69 /* uint32_t */ |
Definition at line 354 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_CSTRING 75 /* `char*`, system LOCALE */ |
String types.
String entries hold inline character data or a pointer. With no array flags, arrayOrUnionDetail is a fixed length in string code units; setting NVTX_PAYLOAD_ENTRY_FLAG_ARRAY_FIXED_SIZE is redundant (still a single fixed-length string, not an array of strings). With NVTX_PAYLOAD_ENTRY_FLAG_ARRAY_LENGTH_INDEX, arrayOrUnionDetail is the index of a length-source entry whose value is the length in string code units, where 0 denotes an empty string. Zero-terminated strings use NVTX_PAYLOAD_ENTRY_FLAG_ARRAY_ZERO_TERMINATED. A string code unit is 1 byte for CSTRING/CSTRING_UTF8, 2 bytes for CSTRING_UTF16, and 4 bytes for CSTRING_UTF32. Despite the CSTRING name, strings with an explicit length need not be null-terminated.
A fixed-length string always occupies (for inline data) or is read (for pointer and deep-copy forms) as exactly the declared number of code units. Its value is the code units up to, but not including, the first null terminator; if no null terminator occurs within the declared length, the value is all of the declared code units. Code units after the first null terminator are ignored.
Pointer strings normally reference data in another payload of the same event. With NVTX_PAYLOAD_ENTRY_FLAG_DEEP_COPY, they may reference arbitrary memory that the tool should copy.
Definition at line 399 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_CSTRING_UTF16 77 |
Definition at line 401 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_CSTRING_UTF32 78 |
Definition at line 402 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_CSTRING_UTF8 76 |
Definition at line 400 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_DOUBLE 20 |
Definition at line 293 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_FLOAT 19 |
Floating point types
Definition at line 292 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_FLOAT128 45 |
Definition at line 343 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_FLOAT16 42 |
IEEE 754 floating-point types with explicit size. The number at the end corresponds to the storage width in bits. The alignment is assumed to match standardized types of the same size.
Definition at line 340 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_FLOAT32 43 |
Definition at line 341 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_FLOAT64 44 |
Definition at line 342 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_INFO_ARRAY_SIZE (NVTX_PAYLOAD_ENTRY_TYPE_CHAR32 + 1) |
There is type size and alignment information for all previous types.
Definition at line 318 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_INT 5 |
Definition at line 270 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_INT128 33 |
These types do not have standardized equivalents. It is assumed that the number at the end corresponds to the bits used to store the value and that the alignment corresponds to standardized types of the same size. A tool may not support these types.
Definition at line 332 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_INT16 13 |
Definition at line 282 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_INT32 15 |
Definition at line 284 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_INT64 17 |
Definition at line 286 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_INT8 11 |
Integer types with explicit size.
Definition at line 280 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_INVALID 0 |
Definition at line 261 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_LONG 7 |
Definition at line 272 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_LONGDOUBLE 21 |
Definition at line 294 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_LONGLONG 9 |
Definition at line 274 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_NVTX_REGISTERED_STRING_HANDLE 80 |
The entry value is of type nvtxStringHandle_t returned by nvtxDomainRegisterString.
Definition at line 408 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_PID_UINT32 71 |
Process ID as scope.
Definition at line 364 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_PID_UINT64 72 |
Definition at line 365 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_SCOPE_ID 70 /* uint64_t */ |
The scope of events or counters (see nvtxScopeRegister).
Definition at line 359 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_SHORT 3 |
Definition at line 268 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_SIZE 22 |
Size type (size_t in C).
Definition at line 299 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_TF32 52 /* TensorFloat-32 (stored in 32 bits) */ |
Definition at line 346 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_TID_UINT32 73 |
Thread ID as scope.
Definition at line 370 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_TID_UINT64 74 |
Definition at line 371 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_UCHAR 2 |
Definition at line 267 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_UINT 6 |
Definition at line 271 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_UINT128 34 |
Definition at line 333 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_UINT16 14 |
Definition at line 283 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_UINT32 16 |
Definition at line 285 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_UINT64 18 |
Definition at line 287 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_UINT8 12 |
Definition at line 281 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_ULONG 8 |
Definition at line 273 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_ULONGLONG 10 |
Definition at line 275 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_UNION_SELECTOR 100 |
This type marks the union selector member (entry index) in schemas used by a union with internal selector. See NVTX_PAYLOAD_SCHEMA_TYPE_UNION_WITH_INTERNAL_SELECTOR.
Definition at line 415 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_USHORT 4 |
Definition at line 269 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPE_WCHAR 24 /* wide character (since C90) */ |
Special character types.
Definition at line 310 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENTRY_TYPES_V1 |
If the same event attribute is specified more than once for a logical event, the latest-specified value is the effective value. Tools may preserve superseded values, but applications should not rely on them being available.
Ordering is: regular nvtxEventAttributes_t attributes first, then nvtxPayloadData_t entries in array order, then schema entries in order.
For ranges, end/pop attributes are ordered later than start/push attributes. Tools that act before range completion can only use attributes known at that time. Runtime filtering on extended-payload attributes is optional for tools; tools may skip it to avoid decoding overhead.
Payload APIs that emit a mark, begin a range, or submit a deferred event supply the event message with NVTX_PAYLOAD_ENTRY_FLAG_EVENT_MESSAGE. If the message is missing, a tool may ignore the event. Range pop/end payloads may omit a message unless they intentionally override the range message. Keep range messages stable for filtering; use color or payload fields for state changes.
Types of entries in a payload schema.
Definition at line 259 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENUM_ATTR_FIELD_ENTRIES (1 << 2) |
Definition at line 557 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENUM_ATTR_FIELD_EXTENSION (1 << 6) |
Definition at line 561 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENUM_ATTR_FIELD_NAME (1 << 1) |
Bitmask values for nvtxPayloadEnumAttr_t::fieldMask.
Each bit indicates that the corresponding field in nvtxPayloadEnumAttr_t has been set by the caller. ENTRIES, NUM_ENTRIES, and SIZE must be set for successful registration.
Definition at line 556 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENUM_ATTR_FIELD_NUM_ENTRIES (1 << 3) |
Definition at line 558 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENUM_ATTR_FIELD_SCHEMA_ID (1 << 5) |
Definition at line 560 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENUM_ATTR_FIELD_SIZE (1 << 4) |
Definition at line 559 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_ENUM_ATTR_FIELDS_V1 |
Definition at line 547 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_EVTATTR_SET | ( | evtAttr, | |
| schema_id, | |||
| pl_addr, | |||
| sz | |||
| ) |
Definition at line 1697 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_EVTATTR_SET_DATA | ( | evtAttr, | |
| pldata_addr, | |||
| schema_id, | |||
| pl_addr, | |||
| sz | |||
| ) |
Helper macro to attach a single payload to an NVTX event attribute.
| evtAttr | NVTX event attributes (variable name). |
| pldata_addr | Address of an nvtxPayloadData_t variable. |
| schema_id | NVTX binary payload schema ID. |
| pl_addr | Address of the payload. |
| sz | Size of the payload. |
Definition at line 1654 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_EVTATTR_SET_MULTIPLE | ( | evtAttr, | |
| pldata | |||
| ) |
Helper macro to attach multiple payloads to an NVTX event attribute.
| evtAttr | NVTX event attributes (variable name). |
| pldata | Payload data array of type nvtxPayloadData_t. |
Definition at line 1670 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_EVTATTR_SET_MULTIPLE_N | ( | evtAttr, | |
| pldata, | |||
| count | |||
| ) |
Helper macro to attach multiple payloads to an NVTX event attribute with an explicit count of payload data objects.
| evtAttr | NVTX event attribute (variable name) |
| pldata | Payload data array (of type nvtxPayloadData_t) |
| count | Number of entries in payload data array |
Definition at line 1685 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_ATTR_FIELD_ALIGNMENT (1 << 7) |
Definition at line 540 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_ATTR_FIELD_ENTRIES (1 << 4) |
Definition at line 537 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_ATTR_FIELD_EXTENSION (1 << 9) |
Definition at line 542 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_ATTR_FIELD_FLAGS (1 << 3) |
Definition at line 536 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_ATTR_FIELD_NAME (1 << 1) |
Bitmask values for nvtxPayloadSchemaAttr_t::fieldMask.
Each bit indicates that the corresponding field in nvtxPayloadSchemaAttr_t has been set by the caller. A tool must not read fields whose bit is not set. TYPE, ENTRIES, and NUM_ENTRIES must be set for successful registration.
Definition at line 534 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_ATTR_FIELD_NUM_ENTRIES (1 << 5) |
Definition at line 538 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_ATTR_FIELD_SCHEMA_ID (1 << 8) |
Definition at line 541 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_ATTR_FIELD_STATIC_SIZE (1 << 6) |
Definition at line 539 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_ATTR_FIELD_TYPE (1 << 2) |
Definition at line 535 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_ATTR_FIELDS_V1 |
Definition at line 525 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_FLAG_COUNTER_GROUP (1 << 3) |
The schema defines a counter group. An NVTX handler can expect that the schema contains entries with counter semantics. For counter registration and sampling, use nvtx3/nvToolsExtCounters.h.
Definition at line 512 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_FLAG_DEEP_COPY (1 << 1) |
This flag indicates that a schema and the corresponding payloads can contain fields which require a deep copy.
Definition at line 497 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_FLAG_MARK (4 << 3) |
Definition at line 520 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_FLAG_NONE 0 |
Flags for static and dynamic schemas.
The schema flags are used with nvtxPayloadSchemaAttr_t::flags.
Definition at line 491 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_FLAG_RANGE_PUSHPOP (2 << 3) |
The schema defines a range or marker. An NVTX handler can expect that the schema contains a message and timestamp(s).
Definition at line 518 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_FLAG_RANGE_STARTEND (3 << 3) |
Definition at line 519 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_FLAG_REFERENCED (1 << 2) |
This flag indicates that a schema and the corresponding payload can be referenced by another payload of the same event. If the schema is not intended to be visualized directly, use NVTX_TYPE_PAYLOAD_SCHEMA_REFERENCED instead.
Definition at line 505 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_FLAGS_V1 |
Definition at line 484 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_ID_DYNAMIC_START (NVTX_STATIC_CAST(uint64_t, 1) << 32) |
Definition at line 441 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_ID_STATIC_START (1 << 24) |
Definition at line 438 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_TYPE_DYNAMIC 2 |
Definition at line 477 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_TYPE_INVALID 0 |
The payload schema type.
A schema can be either of the following types. It is set with nvtxPayloadSchemaAttr_t::type.
Static schemas (NVTX_PAYLOAD_SCHEMA_TYPE_STATIC) describe C-like structs with a fixed binary size. All entry offsets and sizes must be deterministic at compile time. Variable-length fields are not allowed.
Dynamic schemas (NVTX_PAYLOAD_SCHEMA_TYPE_DYNAMIC) allow variable-length fields. A tool parses fields sequentially, advancing a running cursor with proper alignment after each field. Entries with an explicit non-zero nvtxPayloadSchemaEntry_t::offset are placed at that offset; otherwise the offset is computed from the cursor. Entries that rely on implicit offsets must be declared in memory order. Arrays of nested dynamic schemas are not supported (each nested dynamic-schema entry must be a scalar). payloadStaticSize may be omitted for dynamic schemas.
Union schemas (NVTX_PAYLOAD_SCHEMA_TYPE_UNION and NVTX_PAYLOAD_SCHEMA_TYPE_UNION_WITH_INTERNAL_SELECTOR) describe C-like unions. The selected member is determined by an external or internal selector entry of integral type.
Definition at line 475 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_TYPE_STATIC 1 |
Definition at line 476 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_TYPE_UNION 3 |
Definition at line 478 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_TYPE_UNION_WITH_INTERNAL_SELECTOR 4 |
Definition at line 479 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_SCHEMA_TYPES_V1 |
| #define NVTX_PAYLOAD_TYPE_EXT (NVTX_STATIC_CAST(int32_t, 0xDFBD0009)) |
Additional value for the enum nvtxPayloadType_t.
Definition at line 76 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_TYPEDEFS_DEFERRED_V1 |
Definition at line 1203 of file nvToolsExtPayload.h.
| #define NVTX_PAYLOAD_TYPEDEFS_V1 |
Definition at line 762 of file nvToolsExtPayload.h.
| #define NVTX_POINTER_AS_PAYLOAD_ULLVALUE | ( | p | ) | (NVTX_STATIC_CAST(uint64_t, NVTX_STATIC_CAST(uintptr_t, p))) |
Helper macro for safe double-cast of a pointer to a uint64_t value.
Definition at line 1639 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_CURRENT_CONTAINER 19 |
Definition at line 622 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_CURRENT_HW_CPU_LOGICAL 5 /* Logical CPU core */ |
Definition at line 614 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_CURRENT_HW_CPU_PHYSICAL 4 /* Physical CPU core */ |
Definition at line 613 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_CURRENT_HW_INNERMOST 15 |
Definition at line 616 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_CURRENT_HW_MACHINE 2 /* Node/machine name */ |
Definition at line 611 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_CURRENT_HW_SOCKET 3 |
Definition at line 612 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_CURRENT_HYPERVISOR 16 |
Definition at line 619 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_CURRENT_KERNEL 18 |
Definition at line 621 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_CURRENT_OS 20 |
Definition at line 623 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_CURRENT_SW_INNERMOST 31 |
Definition at line 629 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_CURRENT_SW_PROCESS 21 /* Process scope */ |
Definition at line 626 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_CURRENT_SW_THREAD 22 /* Thread scope */ |
Definition at line 627 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_CURRENT_VM 17 |
Definition at line 620 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_ID_DYNAMIC_START (NVTX_STATIC_CAST(uint64_t, 1) << 32) |
Definition at line 635 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_ID_STATIC_START (1 << 24) |
Static (user-provided) scope IDs.
Definition at line 632 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_NONE 0 /* No scope specified. */ |
Definition at line 607 of file nvToolsExtPayload.h.
| #define NVTX_SCOPE_ROOT 1 /* The root in a hierarchy. */ |
Definition at line 608 of file nvToolsExtPayload.h.
| #define NVTX_SCOPES_V1 |
An NVTX scope describes where an event or counter originated, or the execution context it belongs to. Predefined scopes identify common execution contexts; custom scopes can be registered with nvtxScopeRegister.
The NVTX_SCOPE_CURRENT_* values are runtime-resolved scope references: a tool resolves them against the live execution context of the instrumented code when an event or counter sample is taken.
Scopes can be specified by payload entries, scope semantics (nvtxSemanticsScope_t), deferred-event batch attributes, or counter registration attributes. If more than one scope applies to the same event role, counter role, or timestamp purpose, tools should select the effective scope in this order:
nvtxCounterAttr_t::scopeId; see nvtxCounterRegister). NVTX_SCOPE_NONE means no scope is specified. Scopes for different purposes are independent and may be different.
Definition at line 605 of file nvToolsExtPayload.h.
| #define NVTX_TIME_DOMAIN_ID_DYNAMIC_START (NVTX_STATIC_CAST(uint64_t, 1) << 32) |
Definition at line 719 of file nvToolsExtPayload.h.
| #define NVTX_TIME_DOMAIN_ID_NONE 0 |
Returned by nvtxTimeDomainRegister if time domain registration failed.
Definition at line 713 of file nvToolsExtPayload.h.
| #define NVTX_TIME_DOMAIN_ID_STATIC_START (1 << 24) |
Static (user-provided) time domain IDs.
Definition at line 716 of file nvToolsExtPayload.h.
| #define NVTX_TIME_V1 |
Definition at line 640 of file nvToolsExtPayload.h.
| #define NVTX_TIMER_FLAG_CLOCK_MONOTONIC (1 << 1) |
Definition at line 723 of file nvToolsExtPayload.h.
| #define NVTX_TIMER_FLAG_CLOCK_STEADY (1 << 2) |
Definition at line 724 of file nvToolsExtPayload.h.
| #define NVTX_TIMER_FLAG_NONE 0 |
Timer properties
Definition at line 722 of file nvToolsExtPayload.h.
| #define NVTX_TIMER_SOURCE_SAFE_CALL_AFTER_PROCESS_TEARDOWN 0 |
Flags specifying whether it is safe or unsafe to call the timestamp provider after process teardown.
Definition at line 737 of file nvToolsExtPayload.h.
| #define NVTX_TIMER_SOURCE_UNSAFE_CALL_AFTER_PROCESS_TEARDOWN 1 |
Definition at line 738 of file nvToolsExtPayload.h.
| #define NVTX_TIMER_START_SYSTEM_BOOT 1 |
Definition at line 728 of file nvToolsExtPayload.h.
| #define NVTX_TIMER_START_UNIX_EPOCH 3 /* 1 January 1970 */ |
Definition at line 730 of file nvToolsExtPayload.h.
| #define NVTX_TIMER_START_UNKNOWN 0 |
Point in time when the timer starts (its value is 0).
Definition at line 727 of file nvToolsExtPayload.h.
| #define NVTX_TIMER_START_VM_BOOT 2 |
Definition at line 729 of file nvToolsExtPayload.h.
| #define NVTX_TIMER_START_WIN_FILETIME 4 /* 1 January 1601 */ |
Definition at line 731 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_C_CLOCK 41 |
Definition at line 689 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_C_TIME 40 |
C timestamp sources
Definition at line 687 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_C_TIMESPEC_GET 42 |
Definition at line 691 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPP_FILE_CLOCK 56 |
Definition at line 707 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPP_GPS_CLOCK 55 |
Definition at line 705 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPP_HIGH_RESOLUTION_CLOCK 51 |
Definition at line 697 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPP_STEADY_CLOCK 50 |
C++ timestamp sources
Definition at line 695 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPP_SYSTEM_CLOCK 52 |
Definition at line 699 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPP_TAI_CLOCK 54 |
Definition at line 703 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPP_UTC_CLOCK 53 |
Definition at line 701 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPU_CLOCK_GETTIME_BOOTTIME 17 |
Definition at line 674 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPU_CLOCK_GETTIME_MONOTONIC 14 |
Definition at line 668 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPU_CLOCK_GETTIME_MONOTONIC_COARSE 16 |
Definition at line 672 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPU_CLOCK_GETTIME_MONOTONIC_RAW 15 |
Definition at line 670 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPU_CLOCK_GETTIME_PROCESS_CPUTIME_ID 18 |
Definition at line 676 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPU_CLOCK_GETTIME_REALTIME 12 |
Definition at line 664 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPU_CLOCK_GETTIME_REALTIME_COARSE 13 |
Definition at line 666 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPU_CLOCK_GETTIME_THREAD_CPUTIME_ID 19 |
Definition at line 678 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPU_TSC 10 |
CPU timestamp sources
Definition at line 660 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_CPU_TSC_NONVIRTUALIZED 11 |
Definition at line 662 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_GPU_GLOBALTIMER 80 /* e.g. PTIMER */ |
GPU timestamp sources
Definition at line 710 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_NONE 0 |
Predefined NVTX_TIMESTAMP_TYPE_* values identify well-known timestamp sources. Where an API accepts a time domain ID, a predefined timestamp type may be used directly as the time domain ID if the source is unambiguous. Timestamp source is not known, e.g. NIC or switch. The NVTX handler can assume that at least two synchronization points are created with NVTX instrumentation.
Definition at line 653 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_TOOL_PROVIDED 1 |
The timestamp was provided by the NVTX handler via nvtxTimestampGet().
Definition at line 656 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_WIN_GSTAFT 31 /* GetSystemTimeAsFileTime */ |
Definition at line 682 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_WIN_GSTAFTP 32 /* GetSystemTimePreciseAsFileTime */ |
Definition at line 683 of file nvToolsExtPayload.h.
| #define NVTX_TIMESTAMP_TYPE_WIN_QPC 30 /* QueryPerformanceCounter */ |
Windows timestamp sources
Definition at line 681 of file nvToolsExtPayload.h.
| #define NVTX_TYPE_PAYLOAD_SCHEMA_RAW 1023 |
Predefined value for raw payload data.
This value can be used in nvtxPayloadData_t::schemaId to indicate that the payload is a blob, which can be shown with an arbitrary data viewer. This value cannot be used as a schema entry type.
Definition at line 435 of file nvToolsExtPayload.h.
| #define NVTX_TYPE_PAYLOAD_SCHEMA_REFERENCED 1022 |
Predefined value for payload data that is referenced in another payload.
This value can be used in nvtxPayloadData_t::schemaId to indicate that the payload is a blob of memory which other payload entries may point into. A tool will not expose this payload directly.
This value cannot be used as a schema entry type.
Definition at line 426 of file nvToolsExtPayload.h.
| #define nvtxPayloadMark | ( | domain, | |
| evtAttr, | |||
| schemaId, | |||
| plAddr, | |||
| size | |||
| ) |
Helper macro to set a marker with extended payload.
| domain | NVTX domain handle |
| evtAttr | Pointer to NVTX event attributes. |
| schemaId | NVTX payload schema ID |
| plAddr | Pointer to the binary payload data. |
| size | Size of the binary payload data in bytes. |
Definition at line 1732 of file nvToolsExtPayload.h.
| #define nvtxPayloadRangePush | ( | domain, | |
| evtAttr, | |||
| schemaId, | |||
| plAddr, | |||
| size | |||
| ) |
Helper macro to push a range with extended payload.
| domain | NVTX domain handle |
| evtAttr | Pointer to NVTX event attributes. |
| schemaId | NVTX payload schema ID |
| plAddr | Pointer to the binary payload data. |
| size | Size of the binary payload data in bytes. |
Definition at line 1714 of file nvToolsExtPayload.h.
| NVTX_DECLSPEC uint8_t NVTX_API nvtxDomainIsEnabled | ( | nvtxDomainHandle_t | domain | ) |
Checks if the given NVTX domain is enabled.
This function can be used to guard expensive code instrumentation. Applications should generally avoid making execution depend on NVTX API results, such as by branching on whether instrumentation is enabled.
If no tool is attached, this function will always return 0. If a tool is attached, but does not handle this function, 1 is returned. If a tool is attached and handles this function, the return value is determined by the tool. Positive (>0) return values indicate that the domain is enabled, 0 indicates that the domain is disabled.
| domain | NVTX domain handle |
| NVTX_DECLSPEC void NVTX_API nvtxEventBatchSubmit | ( | nvtxDomainHandle_t | domain, |
| const nvtxEventBatch_t * | eventBatch | ||
| ) |
Submit a batch of deferred events in the given domain.
| domain | NVTX domain handle. |
| eventBatch | Pointer to deferred events batch details. |
| NVTX_DECLSPEC void NVTX_API nvtxEventSubmit | ( | nvtxDomainHandle_t | domain, |
| const nvtxPayloadData_t * | payloadData, | ||
| size_t | numPayloads | ||
| ) |
Submit one deferred event.
See NVTX_PAYLOAD_EVENT_MESSAGE_REQUIREMENT.
| domain | NVTX domain handle. |
| payloadData | Pointer to an array of structured payloads. |
| numPayloads | Number of payloads of the event. |
| NVTX_DECLSPEC void NVTX_API nvtxMarkPayload | ( | nvtxDomainHandle_t | domain, |
| const nvtxPayloadData_t * | payloadData, | ||
| size_t | count | ||
| ) |
Marks an instantaneous event in the application with the attributes being passed via the extended payload.
See NVTX_PAYLOAD_EVENT_MESSAGE_REQUIREMENT.
| domain | NVTX domain handle |
| payloadData | pointer to an array of structured payloads. |
| count | number of payload BLOBs. |
| NVTX_DECLSPEC uint64_t NVTX_API nvtxPayloadEnumRegister | ( | nvtxDomainHandle_t | domain, |
| const nvtxPayloadEnumAttr_t * | attr | ||
| ) |
Register an enumeration type with the payload extension.
The attr pointer only needs to be valid during the call.
| domain | NVTX domain handle |
| attr | Pointer to the payload enumeration type attributes. |
0 on failure. | NVTX_DECLSPEC uint64_t NVTX_API nvtxPayloadSchemaRegister | ( | nvtxDomainHandle_t | domain, |
| const nvtxPayloadSchemaAttr_t * | attr | ||
| ) |
Register a payload schema.
The attr pointer only needs to be valid during the call.
| domain | NVTX domain handle. |
| attr | Pointer to the payload schema attributes. |
0 on failure (e.g. invalid layout, or duplicate ID). | NVTX_DECLSPEC void NVTX_API nvtxRangeEndPayload | ( | nvtxDomainHandle_t | domain, |
| nvtxRangeId_t | id, | ||
| const nvtxPayloadData_t * | payloadData, | ||
| size_t | count | ||
| ) |
End a thread range and pass a custom payload.
Same attribute precedence as nvtxRangePopPayload.
| domain | NVTX domain handle |
| id | The correlation ID returned from a NVTX range start call. |
| payloadData | pointer to an array of structured payloads. |
| count | number of payload BLOBs. |
| NVTX_DECLSPEC int NVTX_API nvtxRangePopPayload | ( | nvtxDomainHandle_t | domain, |
| const nvtxPayloadData_t * | payloadData, | ||
| size_t | count | ||
| ) |
End a nested thread range with an additional custom payload.
NVTX event attributes passed to this function (via the payloads) are later specifications of the same range's attributes; see NVTX_PAYLOAD_EVENT_ATTRIBUTE_PRECEDENCE. Other payload entries extend the data of the range.
See NVTX_PAYLOAD_EVENT_MESSAGE_REQUIREMENT.
| domain | NVTX domain handle |
| payloadData | pointer to an array of structured payloads. |
| count | number of payload BLOBs. |
| NVTX_DECLSPEC int NVTX_API nvtxRangePushPayload | ( | nvtxDomainHandle_t | domain, |
| const nvtxPayloadData_t * | payloadData, | ||
| size_t | count | ||
| ) |
Begin a nested thread range with the attributes being passed via the payload.
See NVTX_PAYLOAD_EVENT_MESSAGE_REQUIREMENT.
| domain | NVTX domain handle |
| payloadData | Pointer to an array of extended payloads. |
| count | Number of payloads. |
| NVTX_DECLSPEC nvtxRangeId_t NVTX_API nvtxRangeStartPayload | ( | nvtxDomainHandle_t | domain, |
| const nvtxPayloadData_t * | payloadData, | ||
| size_t | count | ||
| ) |
Start a thread range with attributes passed via the extended payload.
See NVTX_PAYLOAD_EVENT_MESSAGE_REQUIREMENT.
| domain | NVTX domain handle |
| payloadData | pointer to an array of structured payloads. |
| count | number of payload BLOBs. |
| NVTX_DECLSPEC uint64_t NVTX_API nvtxScopeRegister | ( | nvtxDomainHandle_t | domain, |
| const nvtxScopeAttr_t * | attr | ||
| ) |
Register a scope.
The attr pointer only needs to be valid during the call.
| domain | NVTX domain handle |
| attr | Pointer to the scope attributes. |
NVTX_SCOPE_NONE is returned. | NVTX_DECLSPEC uint64_t NVTX_API nvtxTimeDomainRegister | ( | nvtxDomainHandle_t | domain, |
| const nvtxTimeDomainAttr_t * | timeAttr | ||
| ) |
Register a time domain. Associates an NVTX scope with the time domain. Timestamps of NVTX events or counters in the scope are interpreted according to the time domain definitions.
| domain | NVTX domain handle. |
| timeAttr | Time domain attributes (timestamp type, scope, flags, etc.). |
| NVTX_DECLSPEC void NVTX_API nvtxTimerSource | ( | nvtxDomainHandle_t | domain, |
| uint64_t | timeDomainId, | ||
| uint64_t | flags, | ||
| int64_t(*)(void) | timestampProviderFn | ||
| ) |
Provide the pointer to a function that returns a timestamp. This enables the tool to create time synchronization points.
| domain | NVTX domain handle. |
| timeDomainId | time domain identifier or timestamp type ID, if it is unambiguous. |
| flags | indicates if it is safe to call the timestamp provider after process teardown. |
| timestampProviderFn | Pointer to a function that returns a timestamp. |
| NVTX_DECLSPEC void NVTX_API nvtxTimerSourceWithData | ( | nvtxDomainHandle_t | domain, |
| uint64_t | timeDomainId, | ||
| uint64_t | flags, | ||
| int64_t(*)(void *data) | timestampProviderFn, | ||
| void * | data | ||
| ) |
Same as nvtxTimerSource, but with an additional data pointer argument.
| domain | NVTX domain handle. |
| timeDomainId | time domain identifier or timestamp type ID, if it is unambiguous. |
| flags | indicates if it is safe to call the timestamp provider after process teardown. |
| timestampProviderFn | Pointer to a function that returns a timestamp. |
| data | Pointer to data that is passed to the timestamp provider function. |
| NVTX_DECLSPEC void NVTX_API nvtxTimestampConversionFactor | ( | nvtxDomainHandle_t | domain, |
| uint64_t | timeDomainIdSrc, | ||
| uint64_t | timeDomainIdDst, | ||
| double | slope, | ||
| int64_t | timestampSrc, | ||
| int64_t | timestampDst | ||
| ) |
Pass a conversion factor between two time domains to the NVTX handler.
| domain | NVTX domain handle. |
| timeDomainIdSrc | source time domain ID or timestamp type ID, if it is unambiguous. |
| timeDomainIdDst | destination time domain ID or timestamp type ID, if it is unambiguous. |
| slope | Conversion factor between the two time domains. |
| timestampSrc | Timestamp in the source time domain. |
| timestampDst | Timestamp in the destination time domain. |
| NVTX_DECLSPEC int64_t NVTX_API nvtxTimestampGet | ( | void | ) |
Get a timestamp from the NVTX handler or tool. If no tool is attached, the CPU TSC might be returned. No guarantees are made. The returned timestamp is just meant to be used in deferred events/counters.
| NVTX_DECLSPEC void NVTX_API nvtxTimeSyncPoint | ( | nvtxDomainHandle_t | domain, |
| uint64_t | timeDomainId1, | ||
| uint64_t | timeDomainId2, | ||
| int64_t | timestamp1, | ||
| int64_t | timestamp2 | ||
| ) |
Provides a synchronization point between two time domains. Two synchronization points are required to enable a timestamp conversion. The tool must know one of the time domains, or at least be able to chain conversions to enable the conversion between the given timestamps.
| domain | NVTX domain handle. |
| timeDomainId1 | time domain 1 ID or timestamp type ID, if it is unambiguous. |
| timeDomainId2 | time domain 2 ID or timestamp type ID, if it is unambiguous. |
| timestamp1 | Timestamp in the first time domain. |
| timestamp2 | Timestamp in the second time domain. |
| NVTX_DECLSPEC void NVTX_API nvtxTimeSyncPointTable | ( | nvtxDomainHandle_t | domain, |
| uint64_t | timeDomainIdSrc, | ||
| uint64_t | timeDomainIdDst, | ||
| const nvtxSyncPoint_t * | syncPoints, | ||
| size_t | count | ||
| ) |
The same as nvtxTimeSyncPoint but with multiple synchronization points.
| domain | NVTX domain handle. |
| timeDomainIdSrc | source time domain ID or timestamp type ID, if it is unambiguous. |
| timeDomainIdDst | destination time domain ID or timestamp type ID, if it is unambiguous. |
| syncPoints | Pointer to an array of synchronization points. |
| count | Number of synchronization points. |