perfmon: revert raw column support 24/32424/2
authorRay Kinsella <mdr@ashroe.eu>
Fri, 21 May 2021 15:17:39 +0000 (16:17 +0100)
committerDamjan Marion <dmarion@me.com>
Wed, 26 May 2021 06:45:40 +0000 (06:45 +0000)
Revert raw column from the perfmon plugin.

Type: refactor

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: If127f57ee2022cc1c0ea5177f1655a792f195f1d

src/plugins/perfmon/cli.c
src/plugins/perfmon/intel/bundle/branch_mispred.c
src/plugins/perfmon/perfmon.h

index f667877..3305480 100644 (file)
@@ -275,19 +275,10 @@ show_perfmon_stats_command_fn (vlib_main_t *vm, unformat_input_t *input,
   perfmon_instance_t *in;
   u8 *s = 0;
   int n_row = 0;
-  u8 raw = 0;
 
   if (b == 0)
     return clib_error_return (0, "no bundle selected");
 
-  while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
-    {
-      if (unformat (input, "raw"))
-       raw = 1;
-      else
-       break;
-    }
-
   n_instances = vec_len (it->instances);
   vec_validate (readings, n_instances - 1);
 
@@ -314,13 +305,6 @@ show_perfmon_stats_command_fn (vlib_main_t *vm, unformat_input_t *input,
       char **hdr = b->column_headers;
       while (hdr[0])
        table_format_cell (t, -1, n_row++, "%s", hdr++[0]);
-
-      if (b->raw_column_headers && raw)
-       {
-         hdr = b->raw_column_headers;
-         while (hdr[0])
-           table_format_cell (t, -1, n_row++, "%s", hdr++[0]);
-       }
     }
 
   int col = 0;
@@ -358,9 +342,6 @@ show_perfmon_stats_command_fn (vlib_main_t *vm, unformat_input_t *input,
   vlib_cli_output (vm, "%U\n", format_table, t);
   table_free (t);
 
-  if (raw)
-    vlib_cli_output (vm, "Sample time is %.4f seconds \n", pm->sample_time);
-
   if (b->footer)
     vlib_cli_output (vm, "\n%s\n", b->footer);
 
index 343adc7..bb5bf48 100644 (file)
@@ -40,15 +40,6 @@ format_branch_mispredictions (u8 *s, va_list *args)
     case 4:
       s = format (s, "%05.2f", (ns->value[2] / (f64) ns->value[0]) * 100);
       break;
-    case 5:
-      s = format (s, "%9f", (f64) ns->value[0]);
-      break;
-    case 6:
-      s = format (s, "%9f", (f64) ns->value[1]);
-      break;
-    case 7:
-      s = format (s, "%9f", (f64) ns->value[2]);
-      break;
     }
   return s;
 }
@@ -65,5 +56,4 @@ PERFMON_REGISTER_BUNDLE (branch_mispredictions) = {
   .format_fn = format_branch_mispredictions,
   .column_headers = PERFMON_STRINGS ("Branches/call", "Branches/pkt",
                                     "Taken/call", "Taken/pkt", "% MisPred"),
-  .raw_column_headers = PERFMON_STRINGS ("branches", "taken", "misses"),
 };
index 3d0bc06..bba22cf 100644 (file)
@@ -110,7 +110,6 @@ typedef struct perfmon_bundle
   perfmon_bundle_init_fn_t *init_fn;
 
   char **column_headers;
-  char **raw_column_headers;
   format_function_t *format_fn;
   clib_cpu_supports_func_t cpu_supports;