Loading apps/decoder.c +10 −0 Original line number Diff line number Diff line Loading @@ -1484,6 +1484,11 @@ static ivas_error decodeG192( } #ifdef WMOPS update_wmops(); #endif #ifdef DEBUGGING #ifdef RAM_ANALYSIS mem_analyze(); #endif #endif } Loading Loading @@ -1840,6 +1845,11 @@ static ivas_error decodeVoIP( #ifdef WMOPS update_wmops(); #endif #ifdef DEBUGGING #ifdef RAM_ANALYSIS mem_analyze(); #endif #endif } Loading apps/encoder.c +5 −0 Original line number Diff line number Diff line Loading @@ -765,6 +765,11 @@ int main( #ifdef WMOPS update_wmops(); #endif #ifdef DEBUGGING #ifdef RAM_ANALYSIS mem_analyze(); #endif #endif } Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ /*#define WMOPS_PER_FRAME*/ /* Output complexity in WMOPS per frame to the file "res/wmops" (one float value per frame) */ /*#define WMOPS_DETAIL*/ /* Activate complexity detail printout for every function. Increases runtime overhead */ /*#define WMOPS_WC_FRAME_ANALYSIS*/ /* Output WMOPS analysis for worst case frame */ /*#define RAM_ANALYSIS*/ /* Output memory allocated with count_malloc each frame. Can be parsed and plotted with scripts/mem_analysis.m */ #ifdef DEBUGGING Loading lib_debug/mem_count.c +24 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,10 @@ typedef INT64 int64_t; #define FALSE 0 #endif #ifdef RAM_ANALYSIS #include "debug.h" #endif /* How to use the tool notes ========================= Loading Loading @@ -906,4 +910,24 @@ size_t mem_count_summary( Counting_Size cnt_size ) return size; } #ifdef DEBUGGING #ifdef RAM_ANALYSIS void mem_analyze( void ) { unsigned int i; char buffer[1024]; for ( i = 0; i < Num_Records_Cur_RAM; i++ ) { sprintf( buffer, "%s:%d,%ld;", Current_Allocations[i].name, Current_Allocations[i].lineno, Current_Allocations[i].block_size ); dbgwrite( buffer, sizeof( char ), strlen( buffer ), 1, "mem_analysis.csv" ); } sprintf( buffer, "\n" ); dbgwrite( buffer, sizeof( char ), strlen( buffer ), 1, "mem_analysis.csv" ); return; } #endif #endif #endif lib_debug/mem_count.h +6 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,12 @@ extern "C" extern void *mem_alloc( const char *func_name, int func_lineno, size_t size, char *alloc_str ); extern void mem_free( const char *func_name, int func_lineno, void *ptr ); #ifdef DEBUGGING #ifdef RAM_ANALYSIS extern void mem_analyze( void ); #endif #endif #ifdef __cplusplus } #endif Loading Loading
apps/decoder.c +10 −0 Original line number Diff line number Diff line Loading @@ -1484,6 +1484,11 @@ static ivas_error decodeG192( } #ifdef WMOPS update_wmops(); #endif #ifdef DEBUGGING #ifdef RAM_ANALYSIS mem_analyze(); #endif #endif } Loading Loading @@ -1840,6 +1845,11 @@ static ivas_error decodeVoIP( #ifdef WMOPS update_wmops(); #endif #ifdef DEBUGGING #ifdef RAM_ANALYSIS mem_analyze(); #endif #endif } Loading
apps/encoder.c +5 −0 Original line number Diff line number Diff line Loading @@ -765,6 +765,11 @@ int main( #ifdef WMOPS update_wmops(); #endif #ifdef DEBUGGING #ifdef RAM_ANALYSIS mem_analyze(); #endif #endif } Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ /*#define WMOPS_PER_FRAME*/ /* Output complexity in WMOPS per frame to the file "res/wmops" (one float value per frame) */ /*#define WMOPS_DETAIL*/ /* Activate complexity detail printout for every function. Increases runtime overhead */ /*#define WMOPS_WC_FRAME_ANALYSIS*/ /* Output WMOPS analysis for worst case frame */ /*#define RAM_ANALYSIS*/ /* Output memory allocated with count_malloc each frame. Can be parsed and plotted with scripts/mem_analysis.m */ #ifdef DEBUGGING Loading
lib_debug/mem_count.c +24 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,10 @@ typedef INT64 int64_t; #define FALSE 0 #endif #ifdef RAM_ANALYSIS #include "debug.h" #endif /* How to use the tool notes ========================= Loading Loading @@ -906,4 +910,24 @@ size_t mem_count_summary( Counting_Size cnt_size ) return size; } #ifdef DEBUGGING #ifdef RAM_ANALYSIS void mem_analyze( void ) { unsigned int i; char buffer[1024]; for ( i = 0; i < Num_Records_Cur_RAM; i++ ) { sprintf( buffer, "%s:%d,%ld;", Current_Allocations[i].name, Current_Allocations[i].lineno, Current_Allocations[i].block_size ); dbgwrite( buffer, sizeof( char ), strlen( buffer ), 1, "mem_analysis.csv" ); } sprintf( buffer, "\n" ); dbgwrite( buffer, sizeof( char ), strlen( buffer ), 1, "mem_analysis.csv" ); return; } #endif #endif #endif
lib_debug/mem_count.h +6 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,12 @@ extern "C" extern void *mem_alloc( const char *func_name, int func_lineno, size_t size, char *alloc_str ); extern void mem_free( const char *func_name, int func_lineno, void *ptr ); #ifdef DEBUGGING #ifdef RAM_ANALYSIS extern void mem_analyze( void ); #endif #endif #ifdef __cplusplus } #endif Loading