22 #ifndef DOCA_TELEMETRY_DPA_H_
23 #define DOCA_TELEMETRY_DPA_H_
28 #define DOCA_TELEMETRY_DPA_PROCESS_NAME_SIZE (17)
29 #define DOCA_TELEMETRY_DPA_THREAD_NAME_SIZE (17)
48 struct doca_telemetry_dpa;
229 uint32_t *dpa_process_num,
260 uint32_t *dpa_threads_num,
362 uint32_t *cumul_samples_num,
394 uint32_t *perf_event_samples_num,
436 uint32_t *dpa_process_list_size);
461 uint32_t *dpa_thread_list_size);
486 uint32_t *dpa_cumul_samples_size);
506 uint32_t dpa_max_perf_event_samples);
525 uint32_t *dpa_max_perf_event_samples);
544 uint32_t *dpa_perf_event_samples_size);
#define DOCA_EXPERIMENTAL
To set a Symbol (or specifically a function) as experimental.
enum doca_error doca_error_t
DOCA API return codes.
struct doca_telemetry_dpa_cumul_info doca_telemetry_dpa_cumul_info_t
Single cumulative info structure.
doca_telemetry_dpa_counter_state
Performance counters state.
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.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_stop(struct doca_telemetry_dpa *dpa)
Stop telemetry DPA context.
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.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_create(struct doca_dev *dev, struct doca_telemetry_dpa **dpa)
Create a DOCA telemetry DPA instance.
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.
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.
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.
struct doca_telemetry_dpa_thread_info doca_telemetry_dpa_thread_info_t
Single thread structure.
struct doca_telemetry_dpa_event_sample doca_telemetry_dpa_event_sample_t
Single performance events tracer structure.
#define DOCA_TELEMETRY_DPA_PROCESS_NAME_SIZE
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.
DOCA_EXPERIMENTAL doca_error_t doca_telemetry_dpa_start(struct doca_telemetry_dpa *dpa)
Start context for telemetry DPA.
doca_telemetry_dpa_counter_type
Performance counters type.
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.
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.
#define DOCA_TELEMETRY_DPA_THREAD_NAME_SIZE
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.
doca_telemetry_dpa_event_sample_type
List of the performance event samples type.
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().
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.
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.
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.
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.
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.
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.
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.
struct doca_telemetry_dpa_process_info doca_telemetry_dpa_process_info_t
Single process structure.
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.
@ DOCA_TELEMETRY_DPA_COUNTER_STATE_INACTIVE
@ DOCA_TELEMETRY_DPA_COUNTER_STATE_ACTIVE
@ DOCA_TELEMETRY_DPA_COUNTER_STATE_RESET
@ DOCA_TELEMETRY_DPA_COUNTER_TYPE_EVENT_TRACER
@ DOCA_TELEMETRY_DPA_COUNTER_TYPE_CUMULATIVE_EVENT
@ DOCA_TELEMETRY_DPA_EVENT_SAMPLE_TYPE_SCHEDULE_OUT
@ DOCA_TELEMETRY_DPA_EVENT_SAMPLE_TYPE_BUFFER_FULL
@ DOCA_TELEMETRY_DPA_EVENT_SAMPLE_TYPE_EMPTY_SAMPLE
@ DOCA_TELEMETRY_DPA_EVENT_SAMPLE_TYPE_SCHEDULE_IN
Single cumulative info structure.
Single performance events tracer structure.
enum doca_telemetry_dpa_event_sample_type type
Single process structure.
char process_name[DOCA_TELEMETRY_DPA_PROCESS_NAME_SIZE]
char thread_name[DOCA_TELEMETRY_DPA_THREAD_NAME_SIZE]