mem-cache: Standardize data parsing in compressors
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Thu, 4 Jun 2020 11:42:56 +0000 (13:42 +0200)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Mon, 31 Aug 2020 17:45:43 +0000 (17:45 +0000)
commitde94a29f85f2296b4e71b12b83037242adce2ac2
tree5540583cd6cfa4d85351abe8c784a212bf3043da
parent3fc4c0a415436c47d95f37ffd3900e0b3a209f08
mem-cache: Standardize data parsing in compressors

The compressors are not able to process a whole line at once,
so they must divide it into multiple same-sized chunks. This
patch makes the base compressor responsible for this division,
so that the derived classes are mostly agnostic to this
translation.

This change has been coupled with a change of the signature
of the public compress() to avoid introducing a temporary
function rename. Previously, this function did not return
the compressed data, under the assumption that everything
related to the compressed data would be handled by the
compressor. However, sometimes the units using the compressor
could need to know or store the compressed data.

For example, when sharing dictionaries the compressed data
must be checked to determine if two blocks can co-allocate
(DISH, Panda et al. 2016).

Change-Id: Id8dbf68936b1457ca8292cc0a852b0f0a2eeeb51
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33379
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
20 files changed:
src/mem/cache/base.cc
src/mem/cache/compressors/Compressors.py
src/mem/cache/compressors/base.cc
src/mem/cache/compressors/base.hh
src/mem/cache/compressors/base_delta.hh
src/mem/cache/compressors/base_delta_impl.hh
src/mem/cache/compressors/cpack.cc
src/mem/cache/compressors/cpack.hh
src/mem/cache/compressors/dictionary_compressor.hh
src/mem/cache/compressors/dictionary_compressor_impl.hh
src/mem/cache/compressors/fpcd.cc
src/mem/cache/compressors/fpcd.hh
src/mem/cache/compressors/multi.cc
src/mem/cache/compressors/multi.hh
src/mem/cache/compressors/perfect.cc
src/mem/cache/compressors/perfect.hh
src/mem/cache/compressors/repeated_qwords.cc
src/mem/cache/compressors/repeated_qwords.hh
src/mem/cache/compressors/zero.cc
src/mem/cache/compressors/zero.hh