misc: Fix hdf5 stats + test

HDF5 stats file creation was not completing correctly due to name
clashes.

Change-Id: Ifc2d52f4bbc62b0c6798ce92f4d027b0ec69a373
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51061
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Davide Basilio Bartolini
2021-09-28 12:00:13 +02:00
parent 68870342c0
commit 3d025b517f
5 changed files with 31 additions and 12 deletions

View File

@@ -39,6 +39,8 @@
#include "base/logging.hh"
#include "base/stats/info.hh"
#include "base/trace.hh"
#include "debug/Stats.hh"
namespace gem5
{
@@ -254,6 +256,8 @@ Hdf5::appendStat(const Info &info, int rank, hsize_t *dims, const double *data)
fspace = H5::DataSpace(rank, dims, max_dims.data());
try {
DPRINTF(Stats, "Creating dataset %s in group %s\n",
info.name, group.getObjName());
data_set = group.createDataSet(info.name,
H5::PredType::NATIVE_DOUBLE, fspace, props);
} catch (const H5::Exception &e) {

View File

@@ -143,7 +143,7 @@ IEW::regProbePoints()
}
IEW::IEWStats::IEWStats(CPU *cpu)
: statistics::Group(cpu),
: statistics::Group(cpu, "iew"),
ADD_STAT(idleCycles, statistics::units::Cycle::get(),
"Number of cycles IEW is idle"),
ADD_STAT(squashCycles, statistics::units::Cycle::get(),

View File

@@ -1893,10 +1893,6 @@ DRAMInterface::DRAMStats::DRAMStats(DRAMInterface &_dram)
ADD_STAT(bytesPerActivate, statistics::units::Byte::get(),
"Bytes accessed per row activation"),
ADD_STAT(bytesRead, statistics::units::Byte::get(),
"Total number of bytes read from DRAM"),
ADD_STAT(bytesWritten, statistics::units::Byte::get(),
"Total number of bytes written to DRAM"),
ADD_STAT(avgRdBW, statistics::units::Rate<
statistics::units::Byte, statistics::units::Second>::get(),
"Average DRAM read bandwidth in MiBytes/s"),
@@ -2548,10 +2544,6 @@ NVMInterface::NVMStats::NVMStats(NVMInterface &_nvm)
statistics::units::Tick, statistics::units::Count>::get(),
"Average memory access latency per NVM burst"),
ADD_STAT(bytesRead, statistics::units::Byte::get(),
"Total number of bytes read from NVM"),
ADD_STAT(bytesWritten, statistics::units::Byte::get(),
"Total number of bytes written to NVM"),
ADD_STAT(avgRdBW, statistics::units::Rate<
statistics::units::Byte, statistics::units::Second>::get(),
"Average DRAM read bandwidth in MiBytes/s"),