Commit 3fa54099 authored by norvell's avatar norvell
Browse files

Put MEM_ANALYSIS within DEBUGGING since it uses dbgwrite. Move switch to...

Put MEM_ANALYSIS within DEBUGGING since it uses dbgwrite. Move switch to debugging section in options.h and disable by default.
parent a1b1037b
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1485,8 +1485,10 @@ static ivas_error decodeG192(
#ifdef WMOPS
        update_wmops();
#endif
#ifdef DEBUGGING
#ifdef RAM_ANALYSIS
        mem_analyze();
#endif
#endif
    }

@@ -1844,8 +1846,10 @@ static ivas_error decodeVoIP(
#ifdef WMOPS
        update_wmops();
#endif
#ifdef DEBUGGING
#ifdef RAM_ANALYSIS
        mem_analyze();
#endif
#endif
    }

+2 −0
Original line number Diff line number Diff line
@@ -766,8 +766,10 @@ int main(
#ifdef WMOPS
        update_wmops();
#endif
#ifdef DEBUGGING
#ifdef RAM_ANALYSIS
        mem_analyze();
#endif
#endif
    }

+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@

#define SUPPORT_JBM_TRACEFILE                   /* support for JBM tracefile, which is needed for 3GPP objective/subjective testing, but not relevant for real-world implementations */
#define RAM_COUNTING_TOOL                       /* tool to automatically count the dynamically alocated static memory consumption */
#define RAM_ANALYSIS

/* #################### End compiler switches ######################### */

@@ -56,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

+2 −1
Original line number Diff line number Diff line
@@ -910,6 +910,7 @@ size_t mem_count_summary( Counting_Size cnt_size )
    return size;
}

#ifdef DEBUGGING
#ifdef RAM_ANALYSIS
void mem_analyze(void)
{
@@ -927,6 +928,6 @@ void mem_analyze(void)
    return;
}
#endif

#endif

#endif
+2 −0
Original line number Diff line number Diff line
@@ -95,9 +95,11 @@ 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
}