From 6d225cc44104306bac5d32c41734fefc1af95614 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 4 Jun 2026 17:59:17 +0200 Subject: Adds heatmaps (WIP) --- arch/v1/arch_plots.cpp | 58 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 21 deletions(-) (limited to 'arch/v1') diff --git a/arch/v1/arch_plots.cpp b/arch/v1/arch_plots.cpp index d88a2a1..d9147cb 100644 --- a/arch/v1/arch_plots.cpp +++ b/arch/v1/arch_plots.cpp @@ -1,43 +1,59 @@ -#define INST_EVENT_ARRAYS(core) \ - INST_EVENT_ARRAY(core, pop) /* instruction population */ \ - INST_EVENT_ARRAY(core, exe) /* instruction executions */ \ - INST_EVENT_ARRAY(core, wrt) /* instruction writes */ - -std::vector> g_arch_traces = { +std::array g_arch_traces = std::to_array>({ #define INST(core, pref, index, label, mnemonic, symbol) \ {#label "_" #pref "_" #core, #label}, -#define INST_EVENT_ARRAY(core, iv) \ - INST_SET(core, iv) #define FOR_CORE(i) \ {"wmb0_" #i, "wmb0_" #i}, \ {"wmb1_" #i, "wmb1_" #i}, \ {"wdea_" #i, "wdea_" #i}, \ - INST_EVENT_ARRAYS(i) + INST_SET(i, pop) \ + INST_SET(i, exe) \ + INST_SET(i, wrt) FOR_CORES #undef FOR_CORE -#undef INST_EVENT_ARRAY #undef INST -}; +}); + +std::array g_arch_traces_heatmaps = std::to_array>({ +#define FOR_CORE(i) \ + {"wev_" #i, "wev_" #i}, \ + {"xev_" #i, "xev_" #i}, + FOR_CORES +#undef FOR_CORE +}); -std::vector g_arch_plots = { +std::array g_arch_plots = std::to_array({ {"wevs", "general", { #define FOR_CORE(i) "wmb0_" #i, "wmb1_" #i, "wdea_" #i, FOR_CORES #undef FOR_CORE }}, -}; +}); -std::vector g_arch_plots_stacked = { +std::array g_arch_plots_stacked = std::to_array({ #define INST(core, pref, index, label, mnemonic, symbol) \ #label "_" #pref "_" #core, -#define INST_EVENT_ARRAY(core, iv) \ - {"i" #iv "%_" #core, "population", { \ - INST_SET(core, iv) \ - }}, #define FOR_CORE(i) \ - INST_EVENT_ARRAYS(i) + {"ipop%_" #i, "population", { INST_SET(i, pop) }}, + FOR_CORES +#undef FOR_CORE +#define FOR_CORE(i) \ + {"iexe%_" #i, "population", { INST_SET(i, exe) }}, + FOR_CORES +#undef FOR_CORE +#define FOR_CORE(i) \ + {"iwrt%_" #i, "population", { INST_SET(i, wrt) }}, FOR_CORES #undef FOR_CORE -#undef INST_EVENT_ARRAY #undef INST -}; +}); + +std::array g_arch_plots_heatmaps = std::to_array({ +#define FOR_CORE(i) \ + {"wev_" #i, "heatmaps", "wev_" #i}, + FOR_CORES +#undef FOR_CORE +#define FOR_CORE(i) \ + {"xev_" #i, "heatmaps", "xev_" #i}, + FOR_CORES +#undef FOR_CORE +}); -- cgit v1.2.1