Improve perfmon json table picker 17/16517/2
authorDave Barach <dave@barachs.net>
Mon, 17 Dec 2018 20:55:52 +0000 (15:55 -0500)
committerFlorin Coras <florin.coras@gmail.com>
Mon, 17 Dec 2018 23:12:54 +0000 (23:12 +0000)
commitbef3619d259b43f4bf4bfd43db1338ddb10a8c39
tree5a71176c9a241c75de2dbd04bedd5f9c78ccffe9
parent82b22f75b903adf6323c1aeb35f1ba2884d1ce87
Improve perfmon json table picker

Built a tool to chew up https://download.01.org/perfmon/mapfile.csv,
and output a table in this format:

typedef struct {
  u8 model;
  u8 stepping;
  u8 has_stepping;
  char *filename;
} file_by_model_and_stepping_t;

static const file_by_model_and_stepping_t fms_table [] =
{
 /* model, stepping, stepping valid, file */
  { 0x2E, 0x0, 0, "NehalemEX_core_V2.json" },
  { 0x1E, 0x0, 0, "NehalemEP_core_V2.json" },
<snip>
  { 0x55, 0x5, 1, "cascadelakex_core_v1.00.json" },
  { 0x55, 0x6, 1, "cascadelakex_core_v1.00.json" },
  { 0x55, 0x7, 1, "cascadelakex_core_v1.00.json" },
<snip>

Change-Id: Ie0e8a7e851799e9d060b966047745039c066ec7b
Signed-off-by: Dave Barach <dave@barachs.net>
src/plugins/perfmon/CMakeLists.txt
src/plugins/perfmon/mapfile_tool.c [new file with mode: 0644]
src/plugins/perfmon/parse_util.c
src/plugins/perfmon/perfmon.c