|
Adaptyst
A comprehensive and architecture-agnostic performance analysis tool
|
#include <unistd.h>#include <unordered_map>#include <unordered_set>#include <dlfcn.h>#include <adaptyst/inject.h>#include <adaptyst/hw_inject.h>#include <adaptyst/socket.hpp>#include <time.h>#include <iostream>#include <mutex>Classes | |
| class | adaptyst::Injection |
Namespaces | |
| namespace | adaptyst |
Macros | |
| #define | _GNU_SOURCE |
Functions | |
| int | handle_error_if_any (int code, const char *type) |
| int | _adaptyst_init_custom_buf_size (unsigned int size) |
| int | _adaptyst_init () |
| const char ** | adaptyst_get_runtime_info () |
| char * | adaptyst_get_error_msg () |
| int | _adaptyst_region_start (const char *name) |
| int | _adaptyst_region_end (const char *name) |
| void | adaptyst_close () |
| int | _adaptyst_send_data (amod_t id, char *buf, unsigned int n) |
| int | _adaptyst_receive_data (amod_t id, char *buf, unsigned int buf_size, int *n) |
| int | _adaptyst_receive_data_timeout (amod_t id, char *buf, unsigned int buf_size, int *n, long timeout_seconds) |
| int | _adaptyst_send_string (amod_t id, const char *str) |
| int | _adaptyst_receive_string (amod_t id, const char **str) |
| int | _adaptyst_receive_string_timeout (amod_t id, const char **str, long timeout_seconds) |
| int | adaptyst_send_data (amod_t id, char *buf, unsigned int n) |
| int | adaptyst_receive_data (amod_t id, char *buf, unsigned int buf_size, int *n) |
| int | adaptyst_receive_data_timeout (amod_t id, char *buf, unsigned int buf_size, int *n, long timeout_seconds) |
| int | adaptyst_send_string (amod_t id, const char *str) |
| int | adaptyst_receive_string (amod_t id, const char **str) |
| int | adaptyst_receive_string_timeout (amod_t id, const char **str, long timeout_seconds) |
| int | adaptyst_send_data_nl (amod_t id, char *buf, unsigned int n) |
| int | adaptyst_receive_data_nl (amod_t id, char *buf, unsigned int buf_size, int *n) |
| int | adaptyst_receive_data_timeout_nl (amod_t id, char *buf, unsigned int buf_size, int *n, long timeout_seconds) |
| int | adaptyst_send_string_nl (amod_t id, const char *str) |
| int | adaptyst_receive_string_nl (amod_t id, const char **str) |
| int | adaptyst_receive_string_timeout_nl (amod_t id, const char **str, long timeout_seconds) |
| void | adaptyst_set_print_errors (unsigned int print) |
| int | adaptyst_init () |
| int | adaptyst_init_custom_buf_size (unsigned int size) |
| int | adaptyst_region_start (const char *name) |
| int | adaptyst_region_end (const char *name) |
| void | adaptyst_set_error (const char *msg) |
| void | adaptyst_set_error_nl (const char *msg) |
| unsigned long long | adaptyst_get_timestamp (int *err) |
| #define _GNU_SOURCE |
| int _adaptyst_init | ( | ) |
| int _adaptyst_init_custom_buf_size | ( | unsigned int | size | ) |
| int _adaptyst_receive_data | ( | amod_t | id, |
| char * | buf, | ||
| unsigned int | buf_size, | ||
| int * | n ) |
| int _adaptyst_receive_data_timeout | ( | amod_t | id, |
| char * | buf, | ||
| unsigned int | buf_size, | ||
| int * | n, | ||
| long | timeout_seconds ) |
| int _adaptyst_receive_string | ( | amod_t | id, |
| const char ** | str ) |
| int _adaptyst_receive_string_timeout | ( | amod_t | id, |
| const char ** | str, | ||
| long | timeout_seconds ) |
| int _adaptyst_region_end | ( | const char * | name | ) |
| int _adaptyst_region_start | ( | const char * | name | ) |
| int _adaptyst_send_data | ( | amod_t | id, |
| char * | buf, | ||
| unsigned int | n ) |
| int _adaptyst_send_string | ( | amod_t | id, |
| const char * | str ) |
| void adaptyst_close | ( | ) |
| char * adaptyst_get_error_msg | ( | ) |
| const char ** adaptyst_get_runtime_info | ( | ) |
| unsigned long long adaptyst_get_timestamp | ( | int * | err | ) |
| int adaptyst_init | ( | ) |
| int adaptyst_init_custom_buf_size | ( | unsigned int | size | ) |
| int adaptyst_receive_data | ( | amod_t | id, |
| char * | buf, | ||
| unsigned int | buf_size, | ||
| int * | n ) |
Receives data from the injection part of the module in a workflow, with no timeout.
| id | The module ID (use module_id). |
| buf | Buffer where received data should be stored. |
| buf_size | Size of the buffer in bytes. |
| n | Pointer to a variable where the number of received bytes should be stored. |
| int adaptyst_receive_data_nl | ( | amod_t | id, |
| char * | buf, | ||
| unsigned int | buf_size, | ||
| int * | n ) |
| int adaptyst_receive_data_timeout | ( | amod_t | id, |
| char * | buf, | ||
| unsigned int | buf_size, | ||
| int * | n, | ||
| long | timeout_seconds ) |
Receives data from the injection part of the module in a workflow, with a specific timeout.
| id | The module ID (use module_id). |
| buf | Buffer where received data should be stored. |
| buf_size | Size of the buffer in bytes. |
| n | Pointer to a variable where the number of received bytes should be stored. |
| timeout_seconds | Timeout in seconds. |
| int adaptyst_receive_data_timeout_nl | ( | amod_t | id, |
| char * | buf, | ||
| unsigned int | buf_size, | ||
| int * | n, | ||
| long | timeout_seconds ) |
| int adaptyst_receive_string | ( | amod_t | id, |
| const char ** | str ) |
Receives a string from the injection part of the module in a workflow, with no timeout.
If the sender has sent n strings using adaptyst_send_string() (where n is a positive integer), adaptyst_receive_string() or its timeout variant must be called n times to receive all of these, in the order they have been sent in.
| id | The module ID (use module_id). |
| str | Pointer to a variable where the received string should be stored. If 0 bytes are received, the variable is set to a null pointer. |
| int adaptyst_receive_string_nl | ( | amod_t | id, |
| const char ** | str ) |
| int adaptyst_receive_string_timeout | ( | amod_t | id, |
| const char ** | str, | ||
| long | timeout_seconds ) |
Receives a string from the injection part of the module in a workflow, with a specific timeout.
If the sender has sent n strings using adaptyst_send_string() (where n is a positive integer), adaptyst_receive_string_timeout() or its non-timeout variant must be called n times to receive all of these, in the order they have been sent in.
| id | The module ID (use module_id). |
| str | Pointer to a variable where the received string should be stored. If 0 bytes are received, the variable is set to a null pointer. |
| timeout_seconds | Timeout in seconds. |
| int adaptyst_receive_string_timeout_nl | ( | amod_t | id, |
| const char ** | str, | ||
| long | timeout_seconds ) |
| int adaptyst_region_end | ( | const char * | name | ) |
| int adaptyst_region_start | ( | const char * | name | ) |
| int adaptyst_send_data | ( | amod_t | id, |
| char * | buf, | ||
| unsigned int | n ) |
Sends data to the injection part of the module in a workflow.
| id | The module ID (use module_id). |
| buf | Data to send. |
| n | Number of bytes to send. |
| int adaptyst_send_data_nl | ( | amod_t | id, |
| char * | buf, | ||
| unsigned int | n ) |
| int adaptyst_send_string | ( | amod_t | id, |
| const char * | str ) |
Sends a string to the injection part of the module in a workflow.
The recipient receives strings in the same order they are sent in as long as the sender uses adaptyst_send_string() and the receiver uses adaptyst_receive_string() or its timeout variant.
| id | The module ID (use module_id). |
| str | String to send. |
| int adaptyst_send_string_nl | ( | amod_t | id, |
| const char * | str ) |
| void adaptyst_set_error | ( | const char * | msg | ) |
| void adaptyst_set_error_nl | ( | const char * | msg | ) |
| void adaptyst_set_print_errors | ( | unsigned int | ) |
| int handle_error_if_any | ( | int | code, |
| const char * | type ) |