aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/dummy/arch_plots.cpp8
-rw-r--r--arch/v1/arch_plots.cpp58
2 files changed, 42 insertions, 24 deletions
diff --git a/arch/dummy/arch_plots.cpp b/arch/dummy/arch_plots.cpp
index 15d6a7b..8cece2f 100644
--- a/arch/dummy/arch_plots.cpp
+++ b/arch/dummy/arch_plots.cpp
@@ -1,3 +1,5 @@
-std::vector<TraceNamed<ImS64>> g_arch_traces = {};
-std::vector<Plot> g_arch_plots = {};
-std::vector<PlotStacked> g_arch_plots_stacked = {};
+std::array<TraceNamed<ImS64>, 0> g_arch_traces = {};
+std::array<TraceHeatmap<ImS64>, 0> g_arch_traces_heatmaps = {};
+std::array<PlotLines, 0> g_arch_plots = {};
+std::array<PlotStacked, 0> g_arch_plots_stacked = {};
+std::array<PlotHeatmap, 0> g_arch_plots_heatmaps = {};
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
+});