NVTX C API Reference v3
NVIDIA Tools Extension Library
Loading...
Searching...
No Matches
Data Fields
nvtxPayloadSchemaEntry_t Struct Reference

Entry in a schema. More...

#include <nvToolsExtPayload.h>

Data Fields

uint64_t flags
 Flags to augment the basic type.
 
uint64_t type
 Predefined payload schema entry type or custom schema ID.
 
const char * name
 Name or label of the payload entry. (Optional)
 
const char * description
 Description of the payload entry. (Optional)
 
uint64_t arrayOrUnionDetail
 String length, array length or member selector for union types.
 
uint64_t offset
 Offset in the binary payload data (in bytes).
 
const nvtxSemanticsHeader_tsemantics
 Additional semantics of the payload entry.
 
const void * reserved
 Reserved for future use. Do not use it!
 

Detailed Description

Entry in a schema.

A payload schema consists of an array of payload schema entries. It is registered with nvtxPayloadSchemaRegister. flag can be set to 0 for simple values, 'type' is the only "required" field. If not set explicitly, all other fields are zero-initialized, which means that the entry has no name and the offset is determined based on self-alignment rules.

Example schema: nvtxPayloadSchemaEntry_t schema[] = { {0, NVTX_EXT_PAYLOAD_TYPE_UINT8, "one byte"}, {0, NVTX_EXT_PAYLOAD_TYPE_INT32, "four bytes"} };

Definition at line 675 of file nvToolsExtPayload.h.

Field Documentation

◆ arrayOrUnionDetail

uint64_t nvtxPayloadSchemaEntry_t::arrayOrUnionDetail

String length, array length or member selector for union types.

If type is a C string type, this field specifies the string length.

If flags specify that the entry is an array, this field specifies the array length. See NVTX_PAYLOAD_ENTRY_FLAG_ARRAY_* for more details.

If type is a union with schema type NVTX_PAYLOAD_SCHEMA_TYPE_UNION (external selection of the union member), this field contains the index (starting with 0) to an entry of integral type in the same schema. The associated field value specifies the selected union member.

Note
An array of schema type NVTX_PAYLOAD_SCHEMA_TYPE_UNION is not supported. NVTX_PAYLOAD_SCHEMA_TYPE_UNION_WITH_INTERNAL_SELECTOR can be used instead.

Definition at line 724 of file nvToolsExtPayload.h.

◆ description

const char* nvtxPayloadSchemaEntry_t::description

Description of the payload entry. (Optional)

A more detail description of the data that is stored with this entry.

Definition at line 705 of file nvToolsExtPayload.h.

◆ flags

uint64_t nvtxPayloadSchemaEntry_t::flags

Flags to augment the basic type.

This field allows additional properties of the payload entry to be specified. Valid values are NVTX_PAYLOAD_ENTRY_FLAG_*.

Definition at line 683 of file nvToolsExtPayload.h.

◆ name

const char* nvtxPayloadSchemaEntry_t::name

Name or label of the payload entry. (Optional)

A meaningful name or label can help organizing and interpreting the data.

Definition at line 698 of file nvToolsExtPayload.h.

◆ offset

uint64_t nvtxPayloadSchemaEntry_t::offset

Offset in the binary payload data (in bytes).

This field specifies the byte offset from the base address of the actual binary data (blob) to the start address of the data of this entry.

It is recommended (but not required) to provide the offset it. Otherwise, the NVTX handler will determine the offset from natural alignment rules. In some cases, e.g. dynamic schema layouts, the offset cannot be set and has to be determined based on the data of prior entries.

Setting the offset can also be used to skip entries during payload parsing.

Definition at line 739 of file nvToolsExtPayload.h.

◆ reserved

const void* nvtxPayloadSchemaEntry_t::reserved

Reserved for future use. Do not use it!

Definition at line 752 of file nvToolsExtPayload.h.

◆ semantics

const nvtxSemanticsHeader_t* nvtxPayloadSchemaEntry_t::semantics

Additional semantics of the payload entry.

The field points to the first element in a linked list, which enables multiple semantic extensions.

Definition at line 747 of file nvToolsExtPayload.h.

◆ type

uint64_t nvtxPayloadSchemaEntry_t::type

Predefined payload schema entry type or custom schema ID.

Predefined types are NVTX_PAYLOAD_ENTRY_TYPE_*. Passing a schema ID enables nesting of schemas.

Definition at line 691 of file nvToolsExtPayload.h.


The documentation for this struct was generated from the following file: