aboutsummaryrefslogtreecommitdiff
path: root/arch/v1/arch_plots.cpp
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2026-05-30 23:07:06 +0200
committerPaul Oliver <contact@pauloliver.dev>2026-06-02 01:58:34 +0200
commit8041d3697efb5eddef2c6e693248842ca0139590 (patch)
tree5f85a176c0debe2dabab2b52f4b42ac309951567 /arch/v1/arch_plots.cpp
parent0df4e501aee0eeaec61217312eddddc077ca53a7 (diff)
adds v1 pop charts (wip)python_server_client
Diffstat (limited to 'arch/v1/arch_plots.cpp')
-rw-r--r--arch/v1/arch_plots.cpp41
1 files changed, 34 insertions, 7 deletions
diff --git a/arch/v1/arch_plots.cpp b/arch/v1/arch_plots.cpp
index 8d35c87..fc084fb 100644
--- a/arch/v1/arch_plots.cpp
+++ b/arch/v1/arch_plots.cpp
@@ -1,16 +1,43 @@
-std::array g_arch_traces = std::to_array<const char *>({
+#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<Trace> g_arch_traces = {
+#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, \
- "wmb1_" #i, \
- "wdea_" #i,
+ {"wmb0_" #i, "wmb0_" #i}, \
+ {"wmb1_" #i, "wmb1_" #i}, \
+ {"wdea_" #i, "wdea_" #i}, \
+ INST_EVENT_ARRAYS(i)
FOR_CORES
#undef FOR_CORE
-});
+#undef INST_EVENT_ARRAY
+#undef INST
+};
-std::array g_arch_plots = std::to_array<Plot>({
+std::vector<Plot> g_arch_plots = {
{"wevs", "general", {
#define FOR_CORE(i) "wmb0_" #i, "wmb1_" #i, "wdea_" #i,
FOR_CORES
#undef FOR_CORE
}},
-});
+};
+
+std::vector<PlotStacked> g_arch_plots_stacked = {
+#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)
+ FOR_CORES
+#undef FOR_CORE
+#undef INST_EVENT_ARRAY
+#undef INST
+};