aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/dummy/arch_plots.cpp5
-rw-r--r--arch/v1/arch.c3
-rw-r--r--arch/v1/arch_plots.cpp41
3 files changed, 38 insertions, 11 deletions
diff --git a/arch/dummy/arch_plots.cpp b/arch/dummy/arch_plots.cpp
index 3631339..ba3dfaf 100644
--- a/arch/dummy/arch_plots.cpp
+++ b/arch/dummy/arch_plots.cpp
@@ -1,2 +1,3 @@
-std::array<const char *, 0> g_arch_traces;
-std::array<Plot, 0> g_arch_plots;
+std::vector<Trace> g_arch_traces = {};
+std::vector<Plot> g_arch_plots = {};
+std::vector<PlotStacked> g_arch_plots_stacked = {};
diff --git a/arch/v1/arch.c b/arch/v1/arch.c
index 0053ec9..b200e5e 100644
--- a/arch/v1/arch.c
+++ b/arch/v1/arch.c
@@ -5,7 +5,6 @@
INST_EVENT_ARRAY(core, 0, pop) /* instruction population */ \
INST_EVENT_ARRAY(core, 1, exe) /* instruction executions */ \
INST_EVENT_ARRAY(core, 2, wrt) /* instruction writes */
-#define INST_EVENT_ARRAYS_COUNT 3
#define ARCH_EVENT_ARRAYS(core) \
ARCH_EVENT_ARRAY(core, 0, wev) /* write events array*/ \
@@ -987,7 +986,7 @@ void arch_push_data_line(void) {
"%ld"
");",
#define INST(core, pref, index, label, mnemonic, symbol) \
- g_cores[core].i##pref,
+ g_cores[core].i##pref[index],
#define INST_EVENT_ARRAY(core, index, iv) \
INST_SET(core, iv)
#define ARCH_EVENT_ARRAY(core, index, ev) \
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
+};