]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/commitdiff
PASDK-254:Add debug IDLE memstat report
authorFrank Livingston <frank-livingston@ti.com>
Thu, 11 May 2017 17:19:58 +0000 (12:19 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Thu, 11 May 2017 17:19:58 +0000 (12:19 -0500)
pasdk/test_dsp/framework/alphaFuncProc.c
pasdk/test_dsp/framework/dbgIdle.c [new file with mode: 0644]
pasdk/test_dsp/framework/dbgIdle.h [new file with mode: 0644]

index f3eae60c51873b166c2bd3bbfca39e2e761314c0..3c59875d34d7376c074c07cee4a929ce0a4c6487 100644 (file)
@@ -54,6 +54,7 @@ All rights reserved.
 #include "paf_alg_print.h"
 #endif /* MEMSTAT_REPORT */
 
+//#include "dbgIdle.h" // FL: debug -- initiate IDLE memstat
 
 #define ENABLE_AE_TRACE
 #ifdef ENABLE_AE_TRACE
@@ -365,6 +366,7 @@ Void taskAfpFxn(AFP_Handle handle)
                     PAF_HEAP_INT, PAF_HEAP_INT1, PAF_HEAP_EXT, 
                         PAF_HEAP_INT1_SHM, PAF_HEAP_EXT_SHM, PAF_HEAP_EXT_NONCACHED_SHM);
 #endif /* MEMSTAT_REPORT */
+                //gRunIdleMemStatRpt=1; // FL: debug
                
                 // Process alpha commands
                 handle->fxns->process(handle);
diff --git a/pasdk/test_dsp/framework/dbgIdle.c b/pasdk/test_dsp/framework/dbgIdle.c
new file mode 100644 (file)
index 0000000..584aed5
--- /dev/null
@@ -0,0 +1,70 @@
+
+/*
+Copyright (c) 2017, Texas Instruments Incorporated - http://www.ti.com/
+All rights reserved.
+
+* Redistribution and use in source and binary forms, with or without 
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of Texas Instruments Incorporated nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+*/
+
+/*
+ *  ======== dbgIdle.c ========
+ */
+
+#include <xdc/std.h>
+#include <xdc/cfg/global.h>
+#include <xdc/runtime/Log.h>
+#include <xdc/runtime/System.h>
+
+
+#define MEMSTAT_REPORT
+#ifdef MEMSTAT_REPORT
+#include "paf_heapMgr.h"
+#include "paf_alg_print.h"
+UInt32 gRunIdleMemStatRpt=0; // export to other threads to allow Idle memstat to run
+#endif /* MEMSTAT_REPORT */
+
+/*
+ *  ======== idleNotifyInfoChange ========
+ *  IDLE function for debugging.
+ *  Can be safely removed from build.
+ */
+Void idleDebug()
+{
+#ifdef MEMSTAT_REPORT
+    if (gRunIdleMemStatRpt == 1)
+    {
+        // Output current heap memory usage
+        PAF_ALG_memStatusPrint("IDLE MEMSTAT REPORT", 
+            PAF_HEAP_INT, PAF_HEAP_INT1, PAF_HEAP_EXT, 
+            PAF_HEAP_INT1_SHM, PAF_HEAP_EXT_SHM, PAF_HEAP_EXT_NONCACHED_SHM);
+        gRunIdleMemStatRpt = 0;
+    }
+#endif    
+}
diff --git a/pasdk/test_dsp/framework/dbgIdle.h b/pasdk/test_dsp/framework/dbgIdle.h
new file mode 100644 (file)
index 0000000..8b47cbb
--- /dev/null
@@ -0,0 +1,42 @@
+
+/*
+Copyright (c) 2017, Texas Instruments Incorporated - http://www.ti.com/
+All rights reserved.
+
+* Redistribution and use in source and binary forms, with or without 
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of Texas Instruments Incorporated nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+*/
+
+/*
+ *  ======== dbgIdle.h ========
+ */
+
+#include <xdc/std.h>
+
+extern UInt32 gRunIdleMemStatRpt; // export to other threads to allow Idle memstat to run