diff options
author | Dave Barach <dave@barachs.net> | 2018-06-13 09:26:05 -0400 |
---|---|---|
committer | Dave Barach <dave@barachs.net> | 2018-06-13 09:26:41 -0400 |
commit | 1ddbc0138b64486b8e51e5e12fcad21fba8b8b68 (patch) | |
tree | af95c33e6e1681498a49b130119103b60f64db08 /src/vpp/api/api.c | |
parent | c7d50970d4ed8a4889b4374e6a1559aef7d3dcc0 (diff) |
Stat segment / client: show run" works now
Seems to have minimal-to-zero performance consequences. Data appears
accurate: result match the debug CLI output. Checked at low rates, 27
MPPS sprayed across two worker threads.
Change-Id: I09ede5150b88a91547feeee448a2854997613004
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vpp/api/api.c')
-rw-r--r-- | src/vpp/api/api.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vpp/api/api.c b/src/vpp/api/api.c index 8bb11c96066..8e24493c0ce 100644 --- a/src/vpp/api/api.c +++ b/src/vpp/api/api.c @@ -367,7 +367,8 @@ vl_api_get_node_graph_t_handler (vl_api_get_node_graph_t * mp) vlib_main_t *vm = vlib_get_main (); void *oldheap; vl_api_get_node_graph_reply_t *rmp; - vlib_node_t ***node_dups; + static vlib_node_t ***node_dups; + static vlib_main_t **stat_vms; pthread_mutex_lock (&am->vlib_rp->mutex); oldheap = svm_push_data_heap (am->vlib_rp); @@ -378,9 +379,10 @@ vl_api_get_node_graph_t_handler (vl_api_get_node_graph_t * mp) vec_validate (vector, 16384); vec_reset_length (vector); - /* $$$$ FIXME */ - node_dups = vlib_node_get_nodes (vm, (u32) ~ 0 /* all threads */ , - 1 /* include stats */ ); + vlib_node_get_nodes (vm, 0 /* main threads */ , + 0 /* include stats */ , + 1 /* barrier sync */ , + &node_dups, &stat_vms); vector = vlib_node_serialize (vm, node_dups, vector, 1 /* include nexts */ , 1 /* include stats */ ); |