NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
DOCA telemetry DPA

Data Structures

struct  doca_telemetry_dpa_process_info
 Single process structure. More...
 
struct  doca_telemetry_dpa_thread_info
 Single thread structure. More...
 
struct  doca_telemetry_dpa_cumul_info
 Single cumulative info structure. More...
 
struct  doca_telemetry_dpa_event_sample
 Single performance events tracer structure. More...
 

Macros

#define DOCA_TELEMETRY_DPA_PROCESS_NAME_SIZE   (17)
 
#define DOCA_TELEMETRY_DPA_THREAD_NAME_SIZE   (17)
 

Typedefs

typedef struct doca_telemetry_dpa_process_info doca_telemetry_dpa_process_info_t
 Single process structure. More...
 
typedef struct doca_telemetry_dpa_thread_info doca_telemetry_dpa_thread_info_t
 Single thread structure. More...
 
typedef struct doca_telemetry_dpa_cumul_info doca_telemetry_dpa_cumul_info_t
 Single cumulative info structure. More...
 
typedef struct doca_telemetry_dpa_event_sample doca_telemetry_dpa_event_sample_t
 Single performance events tracer structure. More...
 

Enumerations

enum  doca_telemetry_dpa_counter_state { DOCA_TELEMETRY_DPA_COUNTER_STATE_ACTIVE = 0x1 , DOCA_TELEMETRY_DPA_COUNTER_STATE_INACTIVE = 0x2 , DOCA_TELEMETRY_DPA_COUNTER_STATE_RESET = 0x3 }
 Performance counters state. More...
 
enum  doca_telemetry_dpa_counter_type { DOCA_TELEMETRY_DPA_COUNTER_TYPE_CUMULATIVE_EVENT = 0x0 , DOCA_TELEMETRY_DPA_COUNTER_TYPE_EVENT_TRACER = 0x1 }
 Performance counters type. More...
 
enum  doca_telemetry_dpa_event_sample_type { DOCA_TELEMETRY_DPA_EVENT_SAMPLE_TYPE_EMPTY_SAMPLE = 0x0 , DOCA_TELEMETRY_DPA_EVENT_SAMPLE_TYPE_SCHEDULE_IN = 0x1 , DOCA_TELEMETRY_DPA_EVENT_SAMPLE_TYPE_SCHEDULE_OUT = 0x2 , DOCA_TELEMETRY_DPA_EVENT_SAMPLE_TYPE_BUFFER_FULL = 0xff }
 List of the performance event samples type. More...
 

Functions

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_cap_is_supported (const struct doca_devinfo *devinfo)
 Check if given device is capable of executing telemetry DPA operations. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_create (struct doca_dev *dev, struct doca_telemetry_dpa **dpa)
 Create a DOCA telemetry DPA instance. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_destroy (struct doca_telemetry_dpa *dpa)
 Destroy doca_telemetry_dpa previously created by doca_telemetry_dpa_create(). More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_start (struct doca_telemetry_dpa *dpa)
 Start context for telemetry DPA. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_stop (struct doca_telemetry_dpa *dpa)
 Stop telemetry DPA context. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_read_processes_list (struct doca_telemetry_dpa *dpa, uint32_t process_id, uint32_t *dpa_process_num, doca_telemetry_dpa_process_info_t *process_list)
 Read the processes info. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_read_thread_list (struct doca_telemetry_dpa *dpa, uint32_t process_id, uint32_t thread_id, uint32_t *dpa_threads_num, doca_telemetry_dpa_thread_info_t *thread_list)
 Read threads info. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_counter_start (struct doca_telemetry_dpa *dpa, uint32_t process_id, enum doca_telemetry_dpa_counter_type type)
 Start device counters sampling - trigger device to collect performance metrics. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_counter_restart (struct doca_telemetry_dpa *dpa, uint32_t process_id, enum doca_telemetry_dpa_counter_type type)
 Restart device counters sampling. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_counter_stop (struct doca_telemetry_dpa *dpa, uint32_t process_id, enum doca_telemetry_dpa_counter_type type)
 Stop device counters sampling. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_read_cumul_info_list (struct doca_telemetry_dpa *dpa, uint32_t process_id, uint32_t thread_id, uint32_t *cumul_samples_num, doca_telemetry_dpa_cumul_info_t *cumul_info_list)
 Read list of the cumulative info counters. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_read_perf_event_list (struct doca_telemetry_dpa *dpa, uint32_t process_id, uint32_t thread_id, uint32_t *perf_event_samples_num, doca_telemetry_dpa_event_sample_t *perf_event_list)
 Read list of the performance event samples. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_dpa_timer_freq (struct doca_telemetry_dpa *dpa, uint32_t *dpa_timer_freq)
 Get DPA timer frequency. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_process_list_size (struct doca_telemetry_dpa *dpa, uint32_t process_id, uint32_t *dpa_process_list_size)
 Get memory size (in bytes) to allocate the process list. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_thread_list_size (struct doca_telemetry_dpa *dpa, uint32_t process_id, uint32_t thread_id, uint32_t *dpa_thread_list_size)
 Get memory size (in bytes) to allocate the thread list. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_cumul_samples_size (struct doca_telemetry_dpa *dpa, uint32_t process_id, uint32_t thread_id, uint32_t *dpa_cumul_samples_size)
 Get memory size (in bytes) to allocate the cumul samples. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_set_max_perf_event_samples (struct doca_telemetry_dpa *dpa, uint32_t dpa_max_perf_event_samples)
 Set maximum number of perf event samples. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_max_perf_event_samples (struct doca_telemetry_dpa *dpa, uint32_t *dpa_max_perf_event_samples)
 Get maximum number of perf event samples. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_perf_event_samples_size (struct doca_telemetry_dpa *dpa, uint32_t *dpa_perf_event_samples_size)
 Get memory size (in bytes) to allocate the perf event samples. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_counter_state (struct doca_telemetry_dpa *dpa, uint32_t process_id, enum doca_telemetry_dpa_counter_state *state)
 Get counter state. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_counter_type (struct doca_telemetry_dpa *dpa, uint32_t process_id, enum doca_telemetry_dpa_counter_type *type)
 Get counter state and type. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_all_process_id (const struct doca_devinfo *devinfo, uint32_t *all_process_id)
 Get all process mask. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_all_thread_id (const struct doca_devinfo *devinfo, uint32_t *all_thread_id)
 Get all threads mask. More...
 

Detailed Description

DOCA telemetry DPA library. For more details please refer to the user guide on DOCA devzone.

Macro Definition Documentation

◆ DOCA_TELEMETRY_DPA_PROCESS_NAME_SIZE

#define DOCA_TELEMETRY_DPA_PROCESS_NAME_SIZE   (17)

Process name limits

Definition at line 28 of file doca_telemetry_dpa.h.

◆ DOCA_TELEMETRY_DPA_THREAD_NAME_SIZE

#define DOCA_TELEMETRY_DPA_THREAD_NAME_SIZE   (17)

Thread name limits

Definition at line 29 of file doca_telemetry_dpa.h.

Typedef Documentation

◆ doca_telemetry_dpa_cumul_info_t

Single cumulative info structure.

◆ doca_telemetry_dpa_event_sample_t

Single performance events tracer structure.

◆ doca_telemetry_dpa_process_info_t

Single process structure.

◆ doca_telemetry_dpa_thread_info_t

Single thread structure.

Enumeration Type Documentation

◆ doca_telemetry_dpa_counter_state

Performance counters state.

Enumerator
DOCA_TELEMETRY_DPA_COUNTER_STATE_ACTIVE 
DOCA_TELEMETRY_DPA_COUNTER_STATE_INACTIVE 
DOCA_TELEMETRY_DPA_COUNTER_STATE_RESET 

Definition at line 53 of file doca_telemetry_dpa.h.

◆ doca_telemetry_dpa_counter_type

Performance counters type.

Enumerator
DOCA_TELEMETRY_DPA_COUNTER_TYPE_CUMULATIVE_EVENT 

Performance counter sample accumulating data across all event executions

DOCA_TELEMETRY_DPA_COUNTER_TYPE_EVENT_TRACER 

Performance counter sample storing them into a cyclic buffer specific to the process

Definition at line 62 of file doca_telemetry_dpa.h.

◆ doca_telemetry_dpa_event_sample_type

List of the performance event samples type.

Enumerator
DOCA_TELEMETRY_DPA_EVENT_SAMPLE_TYPE_EMPTY_SAMPLE 
DOCA_TELEMETRY_DPA_EVENT_SAMPLE_TYPE_SCHEDULE_IN 
DOCA_TELEMETRY_DPA_EVENT_SAMPLE_TYPE_SCHEDULE_OUT 
DOCA_TELEMETRY_DPA_EVENT_SAMPLE_TYPE_BUFFER_FULL 

Definition at line 72 of file doca_telemetry_dpa.h.

Function Documentation

◆ doca_telemetry_dpa_cap_is_supported()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_cap_is_supported ( const struct doca_devinfo *  devinfo)

Check if given device is capable of executing telemetry DPA operations.

Parameters
[in]devinfoThe DOCA device information.
Returns
DOCA_SUCCESS - in case device supports telemetry DPA. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - failed to query the device for its capabilities.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support telemetry DPA.
  • DOCA_ERROR_OPERATING_SYSTEM - user does not have the required permissions to access the device.
  • DOCA_ERROR_NOT_FOUND - could not find FWCTL FD associated with devinfo.

◆ doca_telemetry_dpa_counter_restart()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_counter_restart ( struct doca_telemetry_dpa *  dpa,
uint32_t  process_id,
enum doca_telemetry_dpa_counter_type  type 
)

Restart device counters sampling.

Note
This function sets event counters to RESET for specific process or all processes with appropriate type.
Parameters
[in]dpaPointer to dpa instance.
[in]process_idDPA process id or all processes id value (this value can be queried using doca_telemetry_dpa_get_all_process_id()).
[in]typeDPA counter type.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - internal doca driver error.
  • DOCA_ERROR_NOT_SUPPORTED - provided counter type is not supported by the DPA device.

◆ doca_telemetry_dpa_counter_start()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_counter_start ( struct doca_telemetry_dpa *  dpa,
uint32_t  process_id,
enum doca_telemetry_dpa_counter_type  type 
)

Start device counters sampling - trigger device to collect performance metrics.

Note
This function sets event counters to ACTIVE for specific process or all processes with appropriate type.
Parameters
[in]dpaPointer to dpa instance.
[in]process_idDPA process id or all processes id value (this value can be queried using doca_telemetry_dpa_get_all_process_id()).
[in]typeDPA counter type.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - internal doca driver error.
  • DOCA_ERROR_BAD_STATE - counter is already started.
  • DOCA_ERROR_NOT_SUPPORTED - provided counter type is not supported by the DPA device.

◆ doca_telemetry_dpa_counter_stop()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_counter_stop ( struct doca_telemetry_dpa *  dpa,
uint32_t  process_id,
enum doca_telemetry_dpa_counter_type  type 
)

Stop device counters sampling.

Note
This function sets event counters to INACTIVE for specific process or all processes with appropriate type.
Parameters
[in]dpaPointer to dpa instance.
[in]process_idDPA process id or all processes id value (this value can be queried using doca_telemetry_dpa_get_all_process_id()).
[in]typeDPA counter type.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - internal doca driver error.
  • DOCA_ERROR_NOT_SUPPORTED - provided counter type is not supported by the DPA device.

◆ doca_telemetry_dpa_create()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_create ( struct doca_dev *  dev,
struct doca_telemetry_dpa **  dpa 
)

Create a DOCA telemetry DPA instance.

Parameters
[in]devThe device to attach to the telemetry DPA instance.
[out]dpaPointer to pointer to be set to point to the created doca_telemetry_dpa instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - internal doca driver error.
  • DOCA_ERROR_NO_MEMORY - failed to allocate resources.

◆ doca_telemetry_dpa_destroy()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_destroy ( struct doca_telemetry_dpa *  dpa)

Destroy doca_telemetry_dpa previously created by doca_telemetry_dpa_create().

Parameters
[in]dpaPointer to instance to be destroyed.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - NULL parameter.
  • DOCA_ERROR_BAD_STATE - context is not stoped.

◆ doca_telemetry_dpa_get_all_process_id()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_all_process_id ( const struct doca_devinfo *  devinfo,
uint32_t *  all_process_id 
)

Get all process mask.

Note
This function gets the specific id used to address all processes simultaneusly.
Parameters
[in]devinfoThe DOCA device information.
[out]all_process_idDPA process id that address all processes.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_telemetry_dpa_get_all_thread_id()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_all_thread_id ( const struct doca_devinfo *  devinfo,
uint32_t *  all_thread_id 
)

Get all threads mask.

Note
This function gets the specific id used to address all threads simultaneusly.
Parameters
[in]devinfoThe DOCA device information.
[out]all_thread_idDPA thread id that address all processes.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_telemetry_dpa_get_counter_state()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_counter_state ( struct doca_telemetry_dpa *  dpa,
uint32_t  process_id,
enum doca_telemetry_dpa_counter_state state 
)

Get counter state.

Note
This function gets event counter state for specific process.
Parameters
[in]dpaPointer to dpa instance.
[in]process_idDPA process id.
[out]stateDPA counter state.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - internal doca driver error.

◆ doca_telemetry_dpa_get_counter_type()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_counter_type ( struct doca_telemetry_dpa *  dpa,
uint32_t  process_id,
enum doca_telemetry_dpa_counter_type type 
)

Get counter state and type.

Note
This function gets event counters type for specific process.
Parameters
[in]dpaPointer to dpa instance.
[in]process_idDPA process id.
[out]typeDPA counter type.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - internal doca driver error.

◆ doca_telemetry_dpa_get_cumul_samples_size()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_cumul_samples_size ( struct doca_telemetry_dpa *  dpa,
uint32_t  process_id,
uint32_t  thread_id,
uint32_t *  dpa_cumul_samples_size 
)

Get memory size (in bytes) to allocate the cumul samples.

Note
This function returns the memory size the user can use to allocate the doca_telemetry_dpa_cumul_info_t output structure.
Parameters
[in]dpaPointer to dpa instance.
[in]process_idDPA process id or all processes id value (this value can be queried using doca_telemetry_dpa_get_all_process_id()).
[in]thread_idDPA thread id or all thread id value (this value can be queried using doca_telemetry_dpa_get_all_thread_id()).
[out]dpa_cumul_samples_sizeMemory size (in bytes) to allocate the cumul samples.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_telemetry_dpa_get_dpa_timer_freq()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_dpa_timer_freq ( struct doca_telemetry_dpa *  dpa,
uint32_t *  dpa_timer_freq 
)

Get DPA timer frequency.

Note
This function returns the DPA timer ticks frequency, given in kHZ. Using this frequency, timer ticks can be converted to running clock using the formula: clock_time = ticks/dpa_timer_frequency
Parameters
[in]dpaPointer to dpa instance.
[out]dpa_timer_freqDPA timer frequency.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_telemetry_dpa_get_max_perf_event_samples()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_max_perf_event_samples ( struct doca_telemetry_dpa *  dpa,
uint32_t *  dpa_max_perf_event_samples 
)

Get maximum number of perf event samples.

Note
This function returns the maximum number of perf event samples to be used to allocate the doca_telemetry_dpa_event_sample_t output structure.
Parameters
[in]dpaPointer to dpa instance.
[out]dpa_max_perf_event_samplesDPA maximum number of perf event samples.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_telemetry_dpa_get_perf_event_samples_size()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_perf_event_samples_size ( struct doca_telemetry_dpa *  dpa,
uint32_t *  dpa_perf_event_samples_size 
)

Get memory size (in bytes) to allocate the perf event samples.

Note
This function returns the memory size the user can use to allocate the doca_telemetry_dpa_event_sample_t output structure.
Parameters
[in]dpaPointer to dpa instance.
[out]dpa_perf_event_samples_sizeMemory size (in bytes) to allocate the perf event samples.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_telemetry_dpa_get_process_list_size()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_process_list_size ( struct doca_telemetry_dpa *  dpa,
uint32_t  process_id,
uint32_t *  dpa_process_list_size 
)

Get memory size (in bytes) to allocate the process list.

Note
This function returns the memory size the user can use to allocate the doca_telemetry_dpa_process_info_t output structure.
Parameters
[in]dpaPointer to dpa instance.
[in]process_idDPA process id or all processes id value (this value can be queried using doca_telemetry_dpa_get_all_process_id()).
[out]dpa_process_list_sizeMemory size (in bytes) to allocate the process list.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_telemetry_dpa_get_thread_list_size()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_get_thread_list_size ( struct doca_telemetry_dpa *  dpa,
uint32_t  process_id,
uint32_t  thread_id,
uint32_t *  dpa_thread_list_size 
)

Get memory size (in bytes) to allocate the thread list.

Note
This function returns the memory size the user can use to allocate the doca_telemetry_dpa_thread_info_t output structure.
Parameters
[in]dpaPointer to dpa instance.
[in]process_idDPA process id or all processes id value (this value can be queried using doca_telemetry_dpa_get_all_process_id()).
[in]thread_idDPA thread id or all thread id value (this value can be queried using doca_telemetry_dpa_get_all_thread_id()).
[out]dpa_thread_list_sizeMemory size (in bytes) to allocate the thread list.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.

◆ doca_telemetry_dpa_read_cumul_info_list()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_read_cumul_info_list ( struct doca_telemetry_dpa *  dpa,
uint32_t  process_id,
uint32_t  thread_id,
uint32_t *  cumul_samples_num,
doca_telemetry_dpa_cumul_info_t cumul_info_list 
)

Read list of the cumulative info counters.

Note
This function reads the list of the cumulative info counters for a specific process or all processes and specific thread or all threads.
If all processes id is provided the thread_id must also be set to address all threads.
Parameters
[in]dpaPointer to dpa instance.
[in]process_idDPA process id or all processes id value (this value can be queried using doca_telemetry_dpa_get_all_process_id()).
[in]thread_idDPA thread id or all thread id value (this value can be queried using doca_telemetry_dpa_get_all_thread_id()).
[out]cumul_samples_numNumber of cumul samples retrieved
[out]cumul_info_listPointer to the list of the cumulative info counters struct pointer.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - internal doca driver error.
  • DOCA_ERROR_NO_MEMORY - failed to allocate resources.
  • DOCA_ERROR_NOT_FOUND - no processes or samples found.

◆ doca_telemetry_dpa_read_perf_event_list()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_read_perf_event_list ( struct doca_telemetry_dpa *  dpa,
uint32_t  process_id,
uint32_t  thread_id,
uint32_t *  perf_event_samples_num,
doca_telemetry_dpa_event_sample_t perf_event_list 
)

Read list of the performance event samples.

Note
This function reads the list of the performance event samples for a specific process or all processes and specific thread or all threads.
If all processes id is provided the thread_id must also be set to address all threads.
Parameters
[in]dpaPointer to dpa instance.
[in]process_idDPA process id or all processes id value (this value can be queried using doca_telemetry_dpa_get_all_process_id()).
[in]thread_idDPA thread id or all thread id value (this value can be queried using doca_telemetry_dpa_get_all_thread_id()).
[out]perf_event_samples_numNumber of perf event samples retrieved
[out]perf_event_listPointer to the list of the performance event samples struct pointer.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - internal doca driver error.
  • DOCA_ERROR_NO_MEMORY - failed to allocate resources.
  • DOCA_ERROR_NOT_FOUND - no processes or samples found.

◆ doca_telemetry_dpa_read_processes_list()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_read_processes_list ( struct doca_telemetry_dpa *  dpa,
uint32_t  process_id,
uint32_t *  dpa_process_num,
doca_telemetry_dpa_process_info_t process_list 
)

Read the processes info.

Note
This function reads the processes info for a specific process or all processes.
Parameters
[in]dpaPointer to dpa instance.
[in]process_idDPA process id or all processes id value (this value can be queried using doca_telemetry_dpa_get_all_process_id()).
[out]dpa_process_numNumber of DPA processes retrieved
[out]process_listPointer to a processes list struct pointer.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - internal doca driver error.
  • DOCA_ERROR_NO_MEMORY - failed to allocate resources.
  • DOCA_ERROR_NOT_FOUND - no processes found.

◆ doca_telemetry_dpa_read_thread_list()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_read_thread_list ( struct doca_telemetry_dpa *  dpa,
uint32_t  process_id,
uint32_t  thread_id,
uint32_t *  dpa_threads_num,
doca_telemetry_dpa_thread_info_t thread_list 
)

Read threads info.

Note
This function reads the threads info for specific process or all processes and specific thread or all threads.
If all processes id is provided the thread_id must also be set to address all threads.
Parameters
[in]dpaPointer to dpa instance.
[in]process_idDPA process id or all processes id value (this value can be queried using doca_telemetry_dpa_get_all_process_id()).
[in]thread_idDPA thread id or all thread id value (this value can be queried using doca_telemetry_dpa_get_all_thread_id()).
[out]dpa_threads_numNumber of DPA threads retrieved
[out]thread_listPointer to thread list struct pointer.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_DRIVER - internal doca driver error.
  • DOCA_ERROR_NO_MEMORY - failed to allocate resources.
  • DOCA_ERROR_NOT_FOUND - no processes or threads found.

◆ doca_telemetry_dpa_set_max_perf_event_samples()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_set_max_perf_event_samples ( struct doca_telemetry_dpa *  dpa,
uint32_t  dpa_max_perf_event_samples 
)

Set maximum number of perf event samples.

Note
This function sets the maximum number of perf event samples to retrieve.
Parameters
[in]dpaPointer to dpa instance.
[in]dpa_max_perf_event_samplesDPA maximum number of perf event samples.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_BAD_STATE - context is already started.
  • DOCA_ERROR_NO_MEMORY - failed to allocate resources.

◆ doca_telemetry_dpa_start()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_start ( struct doca_telemetry_dpa *  dpa)

Start context for telemetry DPA.

Parameters
[in]dpaPointer to dpa instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - NULL parameter.
  • DOCA_ERROR_BAD_STATE - context is already started.

◆ doca_telemetry_dpa_stop()

DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_stop ( struct doca_telemetry_dpa *  dpa)

Stop telemetry DPA context.

Parameters
[in]dpaPointer to dpa instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - NULL parameter.
  • DOCA_ERROR_BAD_STATE - dpa instance doesn't require stopping.