![]() |
TIOVX User Guide
|
APIs for logging of statically allocated framework data structures.
Data Structures | |
| struct | tivx_resource_stats_t |
| Struct containing config parameters of given static resource. Allows for a log to be kept of the resources used throughout runtime. More... | |
Defines | |
| #define | TIVX_MAX_CONFIG_PARAM_OBJECTS (12u) |
| Max number of data objects that contribute to a configuration parameter's memory footprint. | |
| #define | TIVX_CONFIG_PARAM_OBJECT_TYPE_DIM (2u) |
| Number of dimensions of a configuration parameter's object type array. | |
| #define | TIVX_RESOURCE_NAME_MAX (39u) |
| Max size of macro. | |
| #define | TIVX_TARGET_RESOURCE_COUNT (4u) |
| Number of resources of a TIOVX perf stats object. | |
| #define | TIVX_RESOURCE_STATS_TABLE_SIZE (58u) |
| Number of resources of a TIOVX perf stats object. | |
Enumerations | |
| enum | tivx_memory_logging_e { TIVX_MEM_LOG_DEFAULT = 0, TIVX_MEM_LOG_OBJECT_DESCRIPTOR = 1, TIVX_MEM_LOG_GLOBAL = 2, TIVX_MEM_LOG_ALL = 3 } |
| Enumerations of memory consumption tool's display modes. More... | |
Functions | |
| void | ownLogResourceInit (void) |
| Initialize max value structs. | |
| void | ownLogResourceDeInit (void) |
| De-Initialize max value structs. | |
| void | ownLogResourceAlloc (const char *resource_name, uint16_t num_allocs) |
| Allocate new resource. | |
| void | ownLogResourceFree (const char *resource_name, uint16_t num_frees) |
| Free resource. | |
| void | ownLogSetResourceUsedValue (const char *resource_name, uint16_t value) |
| Set max value of resource. | |
| vx_status | tivxQueryResourceStats (const char *resource_name, tivx_resource_stats_t *stats) |
| Query resource for resource stats. More... | |
| void | tivxPrintAllResourceStats (void) |
| Prints out resource stats. | |
| vx_status | tivxExportAllResourceMaxUsedValueToFile (void) |
| Exports the max used values to a file. More... | |
| vx_status | tivxExportMemoryConsumption (char *outputFile, const char *unit, vx_enum displayMode) |
| Exports memory consumption information to console or a specified file. Note that the object descriptor values returned by this API are local only to the process/core this is being called on. More... | |
| vx_status VX_API_CALL | tivxExportGraphToDot (vx_graph graph, const char *output_file_path, const char *output_file_prefix) |
| Export graph representation as DOT graph file. More... | |
Enumerations of memory consumption tool's display modes.
Definition at line 214 of file tivx_log_stats.h.
| vx_status tivxQueryResourceStats | ( | const char * | resource_name, |
| tivx_resource_stats_t * | stats | ||
| ) |
Query resource for resource stats.
| [in] | resource_name | Name of the resource to query |
| [out] | stats | Pointer to resource statistic returned from the query |
vx_status_e enumeration. | VX_SUCCESS | No errors. |
| VX_FAILURE | Unable to find "resource_name" in list of resources |
| vx_status tivxExportAllResourceMaxUsedValueToFile | ( | void | ) |
Exports the max used values to a file.
Note 1: For PC emulation mode, the exported files will not have a legend with the correct target Note 2: For target mode, only the .txt files will be generated. These can be converted to JPEG's using the following command:
dot -Tjpg -o<output file="" path>="">/<jpg name>="">.jpg <text file="" name>="">
For example, to generate a JPEG named "graph.jpg" for the file "graph.txt" in the current directory, the following command would be used.
dot -Tjpg -o./graph.jpg graph.txt
vx_status_e enumeration. | VX_SUCCESS | Output was successfully written to file |
| VX_FAILURE | Unable to open output file, or TIVX_LOG_RESOURCE_ENABLE was not defined |
Exports memory consumption information to console or a specified file. Note that the object descriptor values returned by this API are local only to the process/core this is being called on.
| [in] | outputFile | Character pointer to indicate name of file where output is desired. The file name can be set to NULL if console output is desired. |
| [in] | unit | Character pointer to indicate the units desired in memory output. The unit options are "B", "KB", "MB", or "all". Any other choice is set to "all". |
| [in] | displayMode | Enum representing the desired mode of display. The mode options are defined in tivx_memory_logging_e |
vx_status_e enumeration. | VX_SUCCESS | Output was output to the console or was successfully written to file |
| VX_FAILURE | Unable to open output file, or TIVX_LOG_RESOURCE_ENABLE was not defined |
| vx_status VX_API_CALL tivxExportGraphToDot | ( | vx_graph | graph, |
| const char * | output_file_path, | ||
| const char * | output_file_prefix | ||
| ) |
Export graph representation as DOT graph file.
Multiple representation of the graph are exported to different files using 'output_file_prefix' as filename prefix. The output files are stored at path 'output_file_path' Note: This must be called after vxVerifyGraph()
| [in] | graph | Graph reference |
| [in] | output_file_path | String specifying the ouput file path |
| [in] | output_file_prefix | String specifying the filename prefix of the output file |