diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2016-04-22 22:26:56 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2019-08-29 12:12:25 +0000 |
commit | 51d38a4b79d54a97d438ecdba5ce94d6e9172eef (patch) | |
tree | 442153e96f6261a7fed4e7a1dfdcfa7f787097d7 /src/base/SConscript | |
parent | ab620aca1b6946bd2978d67103b0734e5dfd475d (diff) | |
download | gem5-51d38a4b79d54a97d438ecdba5ce94d6e9172eef.tar.xz |
stats: Add beta support for HDF5 stat dumps
This changeset add support for stat dumps in the HDF5 file
format. HDF5 is a binary data format that represents data in a
file-system-like balanced tree. It has native support for
N-dimensional arrays and binary data (e.g., frame buffers).
It has the following benefits over traditional text stat files:
* Efficient storage of time series (multiple stat dumps)
* Fast lookup of stats
* Plenty of existing tooling (e.g., Python libraries and graphical
viewers)
* File format can be used to store frame buffers together with
normal stats.
Drawbacks:
* Large startup cost (single stat dump larger than text equivalent)
* Stat dumps are slower than text
Known limitations:
* Distributions and histograms aren't supported.
HDF5 stat output can be enabled using the 'h5' URL scheme when
overriding the stat file name on gem5's command line. The following
parameters are supported:
* chunking (unsigned): Number of time steps to pre-allocate
(default: 10)
* desc (bool): Output stat descriptions (default: True)
* formulas (bool): Output derived stats (default: True)
Example gem5 command line:
./build/ARM/gem5.opt \
--stats-file="h5://stats.h5?desc=False;formulas=False" \
configs/example/fs.py
Example Python stat consumer that computes IPC:
import h5py
f = h5py.File('stats.h5', 'r')
group = f['/system/cpu']
for i, c in zip(group['committedInsts'], group['numCycles']):
print i, c, i / c
Change-Id: I351c6cbff2fb7bef9012f47876ba227ed288975b
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/8121
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Diffstat (limited to 'src/base/SConscript')
-rw-r--r-- | src/base/SConscript | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/base/SConscript b/src/base/SConscript index 96f7b5b50..2c8f73371 100644 --- a/src/base/SConscript +++ b/src/base/SConscript @@ -83,6 +83,8 @@ Source('loader/symtab.cc') Source('stats/group.cc') Source('stats/text.cc') +if env['USE_HDF5']: + Source('stats/hdf5.cc') GTest('addr_range.test', 'addr_range.test.cc') GTest('addr_range_map.test', 'addr_range_map.test.cc') |