mem-cache,python: Allow custom TLB and events in each prefetcher.
authorIsaac Sánchez Barrera <isaac.sanchez@bsc.es>
Fri, 7 Aug 2020 10:12:10 +0000 (12:12 +0200)
committerIsaac Sánchez Barrera <isaac.sanchez@bsc.es>
Mon, 17 Aug 2020 11:35:48 +0000 (11:35 +0000)
commit7740fd7714f0a17ef3e68b1dd91d030b704fbffc
treeacc1c122983545cf561078c0c14277e478aaa71c
parent7121bc58ac8cdcaf56ada4d4e5abce1a9efffab3
mem-cache,python: Allow custom TLB and events in each prefetcher.

The `BasePrefetcher` python class had members `_events` and `_tlbs`
defined as lists, meaning that any call to `list.append` on them would
affect `_events` and `_tlbs` for all prefetchers, not just the calling
object.  This change redefines them as instance members to fix the
problem.

Change-Id: I68feb1d6d78e2fa5e8775afba8c81c6dd0de6c60
Signed-off-by: Isaac Sánchez Barrera <isaac.sanchez@bsc.es>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32394
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
src/mem/cache/prefetch/Prefetcher.py