From 1d3228481f3c5f9a4ad041cd21d57139f5f8f331 Mon Sep 17 00:00:00 2001 From: Lisa Hsu Date: Tue, 23 Feb 2010 09:34:22 -0800 Subject: cache: Make caches sharing aware and add occupancy stats. On the config end, if a shared L2 is created for the system, it is parameterized to have n sharers as defined by option.num_cpus. In addition to making the cache sharing aware so that discriminating tag policies can make use of context_ids to make decisions, I added an occupancy AverageStat and an occ % stat to each cache so that you could know which contexts are occupying how much cache on average, both in terms of blocks and percentage. Note that since devices have context_id -1, having an array of occ stats that correspond to each context_id will break here, so in FS mode I add an extra bucket for device blocks. This bucket is explicitly not added in SE mode in order to not only avoid ugliness in the stats.txt file, but to avoid broken stats (some formulas break when a bucket is 0). --- configs/example/se.py | 1 + 1 file changed, 1 insertion(+) (limited to 'configs/example/se.py') diff --git a/configs/example/se.py b/configs/example/se.py index c490ed6b6..7c09bcc5c 100644 --- a/configs/example/se.py +++ b/configs/example/se.py @@ -151,6 +151,7 @@ if options.l2cache: system.tol2bus = Bus() system.l2.cpu_side = system.tol2bus.port system.l2.mem_side = system.membus.port + system.l2.num_cpus = np for i in xrange(np): if options.caches: -- cgit v1.2.3