misc: Merge branch v21.1.0.2 hotfix branch into develop
Change-Id: I225dddd6ec1399528f4759a3c5c5e306d8c7a38c
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
# Version 21.1.0.2
|
||||
|
||||
**[HOTFIX]** [A commit introduced `std::vector` with `resize()` to initialize all storages](https://gem5-review.googlesource.com/c/public/gem5/+/27085).
|
||||
This caused data duplication in statistics and broke the Vector statistics.
|
||||
This hotfix initializes using loops which fixes the broken statistics.
|
||||
|
||||
# Version 21.1.0.1
|
||||
|
||||
**[HOTFIX]** [A "'deprecated' attribute directive ignored" warning was being thrown frequently when trying to build v21.1.0.0](https://gem5.atlassian.net/browse/GEM5-1063). While this issue did not break the build, it made reading the build output difficult and caused confused. As such a patch has been applied to fix this issue.
|
||||
|
||||
@@ -952,7 +952,10 @@ class VectorBase : public DataWrapVec<Derived, VectorInfoProxy>
|
||||
fatal_if(s <= 0, "Storage size must be positive");
|
||||
fatal_if(check(), "Stat has already been initialized");
|
||||
|
||||
storage.resize(s, new Storage(this->info()->getStorageParams()));
|
||||
storage.reserve(s);
|
||||
for (size_type i = 0; i < s; ++i)
|
||||
storage.push_back(new Storage(this->info()->getStorageParams()));
|
||||
|
||||
this->setInit();
|
||||
}
|
||||
|
||||
@@ -1178,7 +1181,10 @@ class Vector2dBase : public DataWrapVec2d<Derived, Vector2dInfoProxy>
|
||||
info->x = _x;
|
||||
info->y = _y;
|
||||
|
||||
storage.resize(x * y, new Storage(info->getStorageParams()));
|
||||
storage.reserve(x * y);
|
||||
for (size_type i = 0; i < x * y; ++i)
|
||||
storage.push_back(new Storage(this->info()->getStorageParams()));
|
||||
|
||||
this->setInit();
|
||||
|
||||
return self;
|
||||
@@ -1387,7 +1393,10 @@ class VectorDistBase : public DataWrapVec<Derived, VectorDistInfoProxy>
|
||||
fatal_if(s <= 0, "Storage size must be positive");
|
||||
fatal_if(check(), "Stat has already been initialized");
|
||||
|
||||
storage.resize(s, new Storage(this->info()->getStorageParams()));
|
||||
storage.reserve(s);
|
||||
for (size_type i = 0; i < s; ++i)
|
||||
storage.push_back(new Storage(this->info()->getStorageParams()));
|
||||
|
||||
this->setInit();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user