aboutsummaryrefslogtreecommitdiff
path: root/arch/v1/arch_plots.cpp
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2026-06-04 17:59:17 +0200
committerPaul Oliver <contact@pauloliver.dev>2026-06-07 03:29:41 +0200
commit6d225cc44104306bac5d32c41734fefc1af95614 (patch)
tree85ddda2b0c3cd738773c8d3ca756d7fbf0eeef2c /arch/v1/arch_plots.cpp
parenteb5f9f6643e0729d35f705c8a7b7b46cb5874a6a (diff)
Adds heatmaps (WIP)
Diffstat (limited to 'arch/v1/arch_plots.cpp')
-rw-r--r--arch/v1/arch_plots.cpp58
1 files changed, 37 insertions, 21 deletions
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<TraceNamed<ImS64>> g_arch_traces = {
+std::array g_arch_traces = std::to_array<TraceNamed<ImS64>>({
#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<TraceHeatmap<ImS64>>({
+#define FOR_CORE(i) \
+ {"wev_" #i, "wev_" #i}, \
+ {"xev_" #i, "xev_" #i},
+ FOR_CORES
+#undef FOR_CORE
+});
-std::vector<Plot> g_arch_plots = {
+std::array g_arch_plots = std::to_array<PlotLines>({
{"wevs", "general", {
#define FOR_CORE(i) "wmb0_" #i, "wmb1_" #i, "wdea_" #i,
FOR_CORES
#undef FOR_CORE
}},
-};
+});
-std::vector<PlotStacked> g_arch_plots_stacked = {
+std::array g_arch_plots_stacked = std::to_array<PlotStacked>({
#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<PlotHeatmap>({
+#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
+});