Davide Basilio Bartolini has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/47739 )

Change subject: base-stats: Fix stat name clash
......................................................................

base-stats: Fix stat name clash

Fixes JIRA issue https://gem5.atlassian.net/browse/GEM5-1028

Change-Id: Id7b294fb3c66e495bebfbe105a8d888ecc0c7198
---
M src/base/stats/hdf5.cc
M src/mem/mem_interface.cc
2 files changed, 12 insertions(+), 5 deletions(-)



diff --git a/src/base/stats/hdf5.cc b/src/base/stats/hdf5.cc
index 0dca54f..90bd8cd 100644
--- a/src/base/stats/hdf5.cc
+++ b/src/base/stats/hdf5.cc
@@ -253,8 +253,15 @@
         props.setDeflate(1);

         fspace = H5::DataSpace(rank, dims, max_dims.data());
- data_set = group.createDataSet(info.name, H5::PredType::NATIVE_DOUBLE,
-                                       fspace, props);
+        try {
+            data_set = group.createDataSet(info.name,
+                H5::PredType::NATIVE_DOUBLE, fspace, props);
+        } catch (const H5::Exception &e) {
+ std::string err = "Failed creating H5::DataSet " + info.name + "; ";
+          err += e.getDetailMsg() + " in " + e.getFuncName();
+ // Rethrow std exception so that it's passed on to the Python world
+          throw std::runtime_error(err);
+        }

         if (enableDescriptions && !info.desc.empty()) {
             addMetaData(data_set, "description", info.desc);
diff --git a/src/mem/mem_interface.cc b/src/mem/mem_interface.cc
index e9c35d2..835d857 100644
--- a/src/mem/mem_interface.cc
+++ b/src/mem/mem_interface.cc
@@ -1849,7 +1849,7 @@
 }

 DRAMInterface::DRAMStats::DRAMStats(DRAMInterface &_dram)
-    : statistics::Group(&_dram),
+    : statistics::Group(&_dram, "interface"),
     dram(_dram),

     ADD_STAT(readBursts, statistics::units::Count::get(),
@@ -2546,9 +2546,9 @@
              "Average memory access latency per NVM burst"),

     ADD_STAT(bytesRead, statistics::units::Byte::get(),
-             "Total number of bytes read from DRAM"),
+             "Total number of bytes read from NVM"),
     ADD_STAT(bytesWritten, statistics::units::Byte::get(),
-             "Total number of bytes written to DRAM"),
+             "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"),

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47739
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Id7b294fb3c66e495bebfbe105a8d888ecc0c7198
Gerrit-Change-Number: 47739
Gerrit-PatchSet: 1
Gerrit-Owner: Davide Basilio Bartolini <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to