From 49362eb1b3afbc2aa2d702e72ddf993f0b7eee08 Mon Sep 17 00:00:00 2001 From: Jakub Palider Date: Tue, 4 Apr 2023 09:58:17 +0200 Subject: Allow client to override default names of caches In multi-processor systems it is desired to track caches separately by assigning unique names to them. Signed-off-by: Jakub Palider --- riscv/cachesim.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/riscv/cachesim.h b/riscv/cachesim.h index d7046f9..b632349 100644 --- a/riscv/cachesim.h +++ b/riscv/cachesim.h @@ -108,7 +108,8 @@ class cache_memtracer_t : public memtracer_t class icache_sim_t : public cache_memtracer_t { public: - icache_sim_t(const char* config) : cache_memtracer_t(config, "I$") {} + icache_sim_t(const char* config, const char* name = "I$") + : cache_memtracer_t(config, name) {} bool interested_in_range(uint64_t UNUSED begin, uint64_t UNUSED end, access_type type) { return type == FETCH; @@ -122,7 +123,8 @@ class icache_sim_t : public cache_memtracer_t class dcache_sim_t : public cache_memtracer_t { public: - dcache_sim_t(const char* config) : cache_memtracer_t(config, "D$") {} + dcache_sim_t(const char* config, const char* name = "D$") + : cache_memtracer_t(config, name) {} bool interested_in_range(uint64_t UNUSED begin, uint64_t UNUSED end, access_type type) { return type == LOAD || type == STORE; -- cgit v1.1