|
Adaptyst
A comprehensive and architecture-agnostic performance analysis tool
|
#include "system.hpp"#include "print.hpp"#include "archive.hpp"#include "adaptyst/output.hpp"#include <ryml.hpp>#include <fstream>#include <dlfcn.h>#include <pybind11/embed.h>Namespaces | |
| namespace | adaptyst |
| const char * adaptyst_get_cpu_mask | ( | amod_t | id | ) |
Gets the CPU mask, which length is equal to the number of CPU cores and where the i-th char (indexing and core numbering from 1) can be either: 'b': the i-th core is for both workflow execution and performance analysis 'p': the i-th core is for performance analysis only 'c': the i-th core is for workflow execution only ' ': the i-th core is not used
This method can be called inside adaptyst_module_init() ONLY. Otherwise, an error will be thrown.
| id | The module ID (use module_id). |
| int adaptyst_get_internal_error_code | ( | amod_t | id | ) |
Gets the error code set by any of the Adaptyst API calls.
| id | The module ID (use module_id). |
| const char * adaptyst_get_internal_error_msg | ( | amod_t | id | ) |
Gets the error message set by any of the Adaptyst API calls.
| id | The module ID (use module_id). |
| const char * adaptyst_get_local_config_dir | ( | amod_t | id | ) |
Gets the path to a directory where Adaptyst local configuration files are stored.
| id | The module ID (use module_id). |
| const char * adaptyst_get_log_dir | ( | amod_t | id | ) |
Gets the path to a directory where Adaptyst logs are stored.
| id | The module ID (use module_id). |
| const char * adaptyst_get_module_dir | ( | amod_t | id | ) |
Gets the path to a directory where all module output files should be stored.
| id | The module ID (use module_id). |
| const char * adaptyst_get_node_name | ( | amod_t | id | ) |
Gets the name of a node a module is attached to.
| id | The module ID (use module_id). |
Gets a module option set by a user.
| id | The module ID (use module_id). |
| key | The name of an option to obtain. |
| profile_info * adaptyst_get_profile_info | ( | amod_t | id | ) |
Gets information necessary for profiling a workflow in form of a profile_info struct.
| id | The module ID (use module_id). |
| const char * adaptyst_get_tmp_dir | ( | amod_t | id | ) |
Gets the path to a temporary directory.
| id | The module ID (use module_id). |
| bool adaptyst_has_in_tag | ( | amod_t | id, |
| const char * | tag ) |
Checks whether any nodes connected to a node a module is attached to (i.e. any nodes with an edge to the module node) has a specific tag.
| id | The module ID (use module_id). |
| tag | Tag to check. |
| bool adaptyst_has_out_tag | ( | amod_t | id, |
| const char * | tag ) |
Checks whether any nodes a module node is connected to (i.e. any nodes with an edge from the module node) has a specific tag.
| id | The module ID (use module_id). |
| tag | Tag to check. |
| bool adaptyst_is_directing_node | ( | amod_t | id | ) |
Returns whether a node a module is attached to is a directing node.
| bool adaptyst_log | ( | amod_t | id, |
| const char * | msg, | ||
| const char * | type ) |
Prints an unformatted message of a given type to Adaptyst logs.
| id | The module ID (use module_id). |
| msg | Message to log. |
| type | Log type (use one of the types declared in log_types). |
| bool adaptyst_print | ( | amod_t | id, |
| const char * | msg, | ||
| bool | sub, | ||
| bool | error, | ||
| const char * | type ) |
Prints a formatted message of a given type to Adaptyst logs, i.e. with a specific prefix indicating whether a message is a main one or a secondary one and whether a message is an error.
| id | The module ID (use module_id). |
| msg | Message to print. |
| sub | Whether a message is a secondary one (if true, "->" is printed before the message, otherwise "==>" is printed). |
| error | Whether a message is an error message. |
| type | Log type (use one of the types declared in log_types). |
| bool adaptyst_process_src_paths | ( | amod_t | id, |
| const char ** | paths, | ||
| int | n ) |
Sends source code paths to Adaptyst for further processing (source code packing etc. is handled by Adaptyst, not modules).
| id | The module ID (use module_id). |
| paths | Array of source code paths. |
| n | Number of source code paths. |
| bool adaptyst_profile_notify | ( | amod_t | id | ) |
Sends a notification to Adaptyst that a module is ready to profile.
| id | The module ID (use module_id). |
| int adaptyst_profile_wait | ( | amod_t | id | ) |
Waits for a workflow executed by Adaptyst to finish running.
| id | The module ID (use module_id). |
| bool adaptyst_set_error | ( | amod_t | id, |
| const char * | msg ) |
Indicates to Adaptyst that a module error has occurred.
| id | The module ID (use module_id). |
| msg | Error message. |
| bool adaptyst_set_profile_info | ( | amod_t | id, |
| profile_info * | info ) |
Sets information necessary for profiling a workflow in form of a profile_info struct. This function propagates information to all modules within an entity and is useful in case a module is in a directing node.
This method can be called inside adaptyst_module_init() ONLY. Otherwise, an error will be thrown.
| id | The module ID (use module_id). |
| info | Pointer to a profile_info struct with profiling information to be set. |
| bool adaptyst_set_will_profile | ( | amod_t | id, |
| bool | will_profile ) |
Indicates to Adaptyst whether a module will profile a workflow. By default, Adaptyst assumes that modules do not profile.
This method can be called inside adaptyst_module_init() ONLY. Otherwise, an error will be thrown.
| id | The module ID (use module_id). |
| will_profile | Whether a module will profile a workflow. |
|
inline |
|
inline |
|
inline |