aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/perfmon/cli.c
diff options
context:
space:
mode:
authormdr78 <mdr@ashroe.eu>2021-03-19 19:03:54 +0000
committerDamjan Marion <dmarion@me.com>2021-04-27 09:22:35 +0000
commit8e1384f7bf2e806e0d65d07af38da269ef1b8338 (patch)
tree4fd4720a58cfeec80550388d37c208b8befc02ac /src/plugins/perfmon/cli.c
parent3f923d2d465aadec8d70fa19e0559030751c2c6c (diff)
perfmon: top down level 1 support
Adding perfmon node TMAM support on ICX. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I48a9a9ff6a72efc28eaf0cb11ef39fb62cebb126
Diffstat (limited to 'src/plugins/perfmon/cli.c')
-rw-r--r--src/plugins/perfmon/cli.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/perfmon/cli.c b/src/plugins/perfmon/cli.c
index 39e0319603a..f6678772d84 100644
--- a/src/plugins/perfmon/cli.c
+++ b/src/plugins/perfmon/cli.c
@@ -128,7 +128,8 @@ show_perfmon_bundle_command_fn (vlib_main_t *vm, unformat_input_t *input,
vlib_cli_output (vm, "%U\n", format_perfmon_bundle, 0, 0);
for (int i = 0; i < vec_len (vb); i++)
- vlib_cli_output (vm, "%U\n", format_perfmon_bundle, vb[i], verbose);
+ if (!vb[i]->cpu_supports || vb[i]->cpu_supports ())
+ vlib_cli_output (vm, "%U\n", format_perfmon_bundle, vb[i], verbose);
vec_free (vb);
return 0;
@@ -290,7 +291,8 @@ show_perfmon_stats_command_fn (vlib_main_t *vm, unformat_input_t *input,
n_instances = vec_len (it->instances);
vec_validate (readings, n_instances - 1);
- for (int i = 0; i < n_instances; i++)
+ /*Only perform read() for THREAD or SYSTEM bundles*/
+ for (int i = 0; i < n_instances && b->type != PERFMON_BUNDLE_TYPE_NODE; i++)
{
in = vec_elt_at_index (it->instances, i);
r = vec_elt_at_index (readings, i);
@@ -340,6 +342,7 @@ show_perfmon_stats_command_fn (vlib_main_t *vm, unformat_input_t *input,
table_set_cell_align (t, col, -1, TTAA_RIGHT);
table_set_cell_fg_color (t, col, -1, TTAC_CYAN);
clib_memcpy_fast (&ns, tr->node_stats + j, sizeof (ns));
+
for (int j = 0; j < n_row; j++)
table_format_cell (t, col, j, "%U", b->format_fn, &ns, j);
}