summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/stats.c
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2018-01-14 18:13:09 +0100
committerXavier Simonart <xavier.simonart@intel.com>2018-01-16 16:53:26 +0100
commitab933e9fd74d5a4e20eeb30e3fab3977e98b8743 (patch)
tree81bd77c978e4308cf51f78391397be7be6998af3 /VNFs/DPPD-PROX/stats.c
parentdeab1ee8197298bd7cf30d259a28206841d59383 (diff)
Integrate irq mode into PROX (support display and command line)
irq mode can be used to show how a core is interrupted by other tasks. This mode does not handle packets. It only loops reading tsc. When the difference between two consecutive calls to rdtsc() is high then it means the core was interrupted. This task implementes the display, so that we can see a histogram of interrupts as well as the maximum, per core. Command line is also supported, through "show irq buckets" (too show the intervals of each buckets, in micrcoseconds), and the stats command line (showing the number of items in each buckets and the max).. Change-Id: I153cc3deaa7b86ae2776ea44e46ef9ecfd116992 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/stats.c')
-rw-r--r--VNFs/DPPD-PROX/stats.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/stats.c b/VNFs/DPPD-PROX/stats.c
index 2418826f..656b8d37 100644
--- a/VNFs/DPPD-PROX/stats.c
+++ b/VNFs/DPPD-PROX/stats.c
@@ -29,6 +29,7 @@
#include "stats_task.h"
#include "stats_prio_task.h"
#include "stats_latency.h"
+#include "stats_irq.h"
/* Stores all readed values from the cores, displaying is done afterwards because
displaying introduces overhead. If displaying was done right after the values
@@ -41,6 +42,7 @@ void stats_reset(void)
stats_prio_task_reset();
stats_port_reset();
stats_latency_reset();
+ stats_irq_reset();
stats_global_reset();
}
@@ -49,6 +51,7 @@ void stats_init(unsigned avg_start, unsigned duration)
stats_lcore_init();
stats_task_init();
stats_prio_task_init();
+ stats_irq_init();
stats_port_init();
stats_mempool_init();
stats_latency_init();
@@ -86,6 +89,9 @@ void stats_update(uint16_t flag_cons)
if (flag_cons & STATS_CONS_F_RINGS)
stats_ring_update();
+ if (flag_cons & STATS_CONS_F_IRQ)
+ stats_irq_update();
+
if (flag_cons & STATS_CONS_F_LCORE)
stats_lcore_post_proc();
@@ -97,4 +103,7 @@ void stats_update(uint16_t flag_cons)
if (flag_cons & STATS_CONS_F_GLOBAL)
stats_global_post_proc();
+
+ if (flag_cons & STATS_CONS_F_IRQ)
+ stats_irq_post_proc();
}