TIOVX User Guide

Detailed Description

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

Enumeration Type Documentation

◆ tivx_memory_logging_e

Enumerations of memory consumption tool's display modes.

Enumerator
TIVX_MEM_LOG_DEFAULT 

Default display mode; Outputs only total global and obj desc memory.

TIVX_MEM_LOG_OBJECT_DESCRIPTOR 

Obj Desc display mode; Outputs only the object descriptor memory info.

TIVX_MEM_LOG_GLOBAL 

Global display mode; Outputs only the TIOVX global memory info.

TIVX_MEM_LOG_ALL 

All display mode; Outputs all possible information.

Definition at line 214 of file tivx_log_stats.h.

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. The file name can be set to NULL if console output is desired.
[in]unitCharacter 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]displayModeEnum representing the desired mode of display. 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