summaryrefslogtreecommitdiffstats
path: root/src/vlib/main.c
diff options
context:
space:
mode:
authorArthur de Kerhor <arthurdekerhor@gmail.com>2021-02-18 03:09:42 -0800
committerBeno�t Ganne <bganne@cisco.com>2021-03-22 09:06:30 +0000
commit156158f06d725d9301940783dff8ccdcc4a01b9b (patch)
tree5051962151bf2a0467c22dec48ef85c055e98f63 /src/vlib/main.c
parentbd8e43dfa045b4aec4ecf4ad3e5503924b5c9c38 (diff)
vlib: graphviz upgrade to allow filters
Possibility to draw only the active nodes on the graph. These are scaled and colored according to their utilization. Type: improvement Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com> Change-Id: I7ddb7b62b3a141cb03750dca24f044138fcc577f
Diffstat (limited to 'src/vlib/main.c')
-rw-r--r--src/vlib/main.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c
index 02fdc89ad99..41f74b9bdf6 100644
--- a/src/vlib/main.c
+++ b/src/vlib/main.c
@@ -570,13 +570,11 @@ vlib_put_next_frame (vlib_main_t * vm,
}
/* Sync up runtime (32 bit counters) and main node stats (64 bit counters). */
-never_inline void
-vlib_node_runtime_sync_stats (vlib_main_t * vm,
- vlib_node_runtime_t * r,
- uword n_calls, uword n_vectors, uword n_clocks)
+void
+vlib_node_runtime_sync_stats_node (vlib_node_t *n, vlib_node_runtime_t *r,
+ uword n_calls, uword n_vectors,
+ uword n_clocks)
{
- vlib_node_t *n = vlib_get_node (vm, r->node_index);
-
n->stats_total.calls += n_calls + r->calls_since_last_overflow;
n->stats_total.vectors += n_vectors + r->vectors_since_last_overflow;
n->stats_total.clocks += n_clocks + r->clocks_since_last_overflow;
@@ -588,6 +586,14 @@ vlib_node_runtime_sync_stats (vlib_main_t * vm,
r->clocks_since_last_overflow = 0;
}
+void
+vlib_node_runtime_sync_stats (vlib_main_t *vm, vlib_node_runtime_t *r,
+ uword n_calls, uword n_vectors, uword n_clocks)
+{
+ vlib_node_t *n = vlib_get_node (vm, r->node_index);
+ vlib_node_runtime_sync_stats_node (n, r, n_calls, n_vectors, n_clocks);
+}
+
always_inline void __attribute__ ((unused))
vlib_process_sync_stats (vlib_main_t * vm,
vlib_process_t * p,