]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/netapi.git/commitdiff
Fix for SDOCM00103205: scheduler cycle counts are not collected properly and are...
authorTinku Mannan <tmannan@ti.com>
Wed, 4 Sep 2013 13:28:43 +0000 (09:28 -0400)
committerTinku Mannan <tmannan@ti.com>
Wed, 4 Sep 2013 13:28:43 +0000 (09:28 -0400)
ti/runtime/netapi/test/net_test_utils.c

index 8f3a942213038918ddf8e31483807eb4385eea8d..22e4a97ce6d5e07eb566990d470b4daf607fad62 100755 (executable)
@@ -412,19 +412,16 @@ void netTest_utilsStatsCb(NETAPI_T h, paSysStats_t* pPaStats)
             (unsigned long) stats[i].total_decrypt_time/stats[i].rx, (unsigned long) stats[i].total_encrypt_time/stats[i].tx);
 
 
-        if (npL && stats[i].rx)
+         netapi_schedGetStats(scheduler[i],&tmp_npL[i],&tmp_cyclesL[i],&tmp_ccyclesL[i]);
+        if (tmp_npL[i] && stats[i].rx)
         {
-            bcpp = cyclesL/npL; 
-            bcpp_noc = (cyclesL-ccyclesL)/npL; 
-            bcpp_app = (stats[i].app_cycles-stats[i].tx_cache_cycles)/stats[i].rx;
-        }
-        else
-        {
-            bcpp = bcpp_noc=bcpp_app=0L;
+            bcpp = tmp_cyclesL[i]/tmp_npL[i];
+            bcpp_noc = bcpp;
+            bcpp_app = (stats[i].app_cycles)/stats[i].rx;
         }
         if (stats[i].tx)
         {
-            bcpp_tx = (stats[i].send_cycles-stats[i].tx_cache_cycles)/stats[i].tx;
+            bcpp_tx = (stats[i].send_cycles)/stats[i].tx;
         }
         else
         {
@@ -435,6 +432,7 @@ void netTest_utilsStatsCb(NETAPI_T h, paSysStats_t* pPaStats)
         printf("\n");
     }
 
+#if 0
 #ifdef netTest_MULTI_THREAD
     for (i=0;i < TUNE_NETAPI_NUM_CORES;i++)
     {
@@ -450,6 +448,8 @@ void netTest_utilsStatsCb(NETAPI_T h, paSysStats_t* pPaStats)
 netapi_schedGetStats(our_sched, &npL,&cyclesL,&ccyclesL);
 #endif
 
+#endif
+
 if(pPaStats)
 {
        printf("C1 number of packets:           %d\n", pPaStats->classify1.nPackets);