Functions | |
itrace_return_t | itrace_open_logger (int domain, itrace_logger_handle_t *logger_handle_ptr) |
Open logger instance. More... | |
itrace_return_t | itrace_close_logger (itrace_logger_handle_t logger_handle) |
Close logger instance. More... | |
itrace_return_t | itrace_set_root_filename (itrace_logger_handle_t logger_handle, const char *root_filename) |
Specify the root name of the files created by the logger. More... | |
itrace_return_t | itrace_get_root_filename (itrace_logger_handle_t logger_handle, char *root_filename) |
Return the current root name being used by the logger. More... | |
itrace_return_t | itrace_flush_logs (itrace_logger_handle_t logger_handle) |
Flush the logs of all opened profilers. More... | |
itrace_return_t | itrace_close_files (itrace_logger_handle_t logger_handle) |
Close the logger output files. More... | |
itrace_return_t | itrace_set_target_files (itrace_logger_handle_t logger_handle, uint32_t file_types) |
Specify the types of files generated by the logger. More... | |
The logger is responsible for the following tasks:
itrace_return_t itrace_close_files | ( | itrace_logger_handle_t | logger_handle | ) |
Close the logger output files.
Note: This function is called automatically by itrace_set_root_filename and itrace_close_logger.
[in] | logger_handle | Handle of the logger instance. |
itrace_return_t itrace_close_logger | ( | itrace_logger_handle_t | logger_handle | ) |
Close logger instance.
[in] | logger_handle | Handle of the logger instance to be closed. |
itrace_return_t itrace_flush_logs | ( | itrace_logger_handle_t | logger_handle | ) |
Flush the logs of all opened profilers.
Retrieve the logs of all opened profilers, parse their contents and write them to files.
Note: This function is called automatically by itrace_close_files.
[in] | logger_handle | Handle of the logger instance. |
itrace_return_t itrace_get_root_filename | ( | itrace_logger_handle_t | logger_handle, |
char * | root_filename | ||
) |
Return the current root name being used by the logger.
Buffer root filename length must be at most ITRACE_MAX_LENGTH_FILENAME bytes
[in] | logger_handle | Handle of the logger instance. |
[out] | root_filename | Root name of the files created by the logger. |
itrace_return_t itrace_open_logger | ( | int | domain, |
itrace_logger_handle_t * | logger_handle_ptr | ||
) |
Open logger instance.
Each logger is associated to a domain on which to run. A domain is a local or remote environment, such as the application processor or one of the DSPs (CDSP, ADSP, etc.). DSP valid domains values are specified in remote.h
and itrace defines additional domains in the Domain extensions.
Limitation: The domain parameter can only be CPU_DOMAIN_ID currently and only one instance may be running at a given time.
[in] | domain | Domain on which the logger instance will reside. |
[out] | logger_handle_ptr | Handle of the logger instance created. |
itrace_return_t itrace_set_root_filename | ( | itrace_logger_handle_t | logger_handle, |
const char * | root_filename | ||
) |
Specify the root name of the files created by the logger.
Example: If root_filename is set to "mytest", the logger will produce ./mytest.json
and ./mytest.csv
if these file types are enabled.
Note: The logger will call itrace_close_files first to ensure that all existing logs are written to the file(s) already opened with a different root name if such files exist already.
Maximum file name size: ITRACE_MAX_LENGTH_FILENAME.
[in] | logger_handle | Handle of the logger instance. |
[in] | root_filename | Root name of the files created by the logger. |
itrace_return_t itrace_set_target_files | ( | itrace_logger_handle_t | logger_handle, |
uint32_t | file_types | ||
) |
Specify the types of files generated by the logger.
By default, the logger will produce json and csv output files.
[in] | logger_handle | Handle of the logger instance. |
[in] | file_types | One or more of the supported Output file types. |