TIOVX User Guide

Detailed Description

APIs for resource logging on the host.

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_RESOURCE_NAME_MAX   (39u)
 Max size of macro.
 

Functions

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...
 

Function Documentation

◆ tivxQueryResourceStats()

vx_status tivxQueryResourceStats ( const char *  resource_name,
tivx_resource_stats_t stats 
)

Query resource for resource stats.

Parameters
[in]resource_nameName of the resource to query
[out]statsPointer to resource statistic returned from the query
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors.
VX_FAILUREUnable to find "resource_name" in list of resources

◆ tivxExportAllResourceMaxUsedValueToFile()

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

Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSOutput was successfully written to file
VX_FAILUREUnable to open output file, or TIVX_LOG_RESOURCE_ENABLE was not defined

◆ tivxExportMemoryConsumption()

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.

Parameters
[in]outputFileCharacter pointer to indicate name of file where output is desired
   Note: The file name can be set to NULL if console output is desired
[in]unitCharacter pointer to indicate the units desired in memory output
   Note: The unit options are "B", "KB", "MB", or "all". Any other choice is set to "all"
[in]displayModeEnum representing the desired mode of display
   Note: The mode options are defined in tivx_memory_logging_e
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSOutput was output to the console or was successfully written to file
VX_FAILUREUnable to open output file, or TIVX_LOG_RESOURCE_ENABLE was not defined

◆ tivxExportGraphToDot()

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()

Parameters
[in]graphGraph reference
[in]output_file_pathString specifying the ouput file path
[in]output_file_prefixString specifying the filename prefix of the output file