summaryrefslogtreecommitdiffstats
path: root/src/plugins/perfmon/cli.c
diff options
context:
space:
mode:
authorRay Kinsella <mdr@ashroe.eu>2021-09-07 16:26:58 +0100
committerDamjan Marion <dmarion@me.com>2021-09-08 14:30:03 +0000
commitc3cb2075deef7cd35401f9d2f00f3aeb23ed16d5 (patch)
treea87cb337cd8e41487e76ed6939dd38545089decf /src/plugins/perfmon/cli.c
parent6f98d9900d1c35292be94307724c6c897c24dfe2 (diff)
perfmon: adding support for papi TMAM
Adding support for Linux papi TMAM on Intel Snowridge. Adds the ability to indicate that a bundle should be thread or node bundle type based on available cpu features (rdpmc support). Type: feature Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Ib871b2644fdb2410fbb580e0d21c3a8e2be13aba
Diffstat (limited to 'src/plugins/perfmon/cli.c')
-rw-r--r--src/plugins/perfmon/cli.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/perfmon/cli.c b/src/plugins/perfmon/cli.c
index 3305480031d..1535570de7e 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++)
- if (!vb[i]->cpu_supports || vb[i]->cpu_supports ())
+ /* bundle type will be unknown if no cpu_supports matched */
+ if (vb[i]->type != PERFMON_BUNDLE_TYPE_UNKNOWN)
vlib_cli_output (vm, "%U\n", format_perfmon_bundle, vb[i], verbose);
vec_free (vb);
@@ -312,7 +313,7 @@ show_perfmon_stats_command_fn (vlib_main_t *vm, unformat_input_t *input,
{
in = vec_elt_at_index (it->instances, i);
r = vec_elt_at_index (readings, i);
- table_format_cell (t, col, -1, "%s", in->name);
+ table_format_cell (t, col, -1, "%s", in->name, b->type);
if (b->type == PERFMON_BUNDLE_TYPE_NODE)
{
perfmon_thread_runtime_t *tr;
@@ -322,19 +323,20 @@ show_perfmon_stats_command_fn (vlib_main_t *vm, unformat_input_t *input,
{
perfmon_node_stats_t ns;
table_format_cell (t, ++col, -1, "%U", format_vlib_node_name,
- vm, j);
+ vm, j, b->type);
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);
+ table_format_cell (t, col, j, "%U", b->format_fn, &ns, j,
+ b->type);
}
}
else
{
for (int j = 0; j < n_row; j++)
- table_format_cell (t, i, j, "%U", b->format_fn, r, j);
+ table_format_cell (t, i, j, "%U", b->format_fn, r, j, b->type);
}
col++;
}