Brandon Potter has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/17108
Change subject: sim-se: small performance optimization
......................................................................
sim-se: small performance optimization
A local variable was being set inside a loop when it should
have been set outside the loop. This changeset moves the
variable to the appropriate place.
Change-Id: If7655b501bd819c39d35dea4c316b4b9ed3173a2
---
M src/sim/process.cc
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sim/process.cc b/src/sim/process.cc
index 7d1a78d..961913d 100644
--- a/src/sim/process.cc
+++ b/src/sim/process.cc
@@ -202,8 +202,8 @@
* host file descriptors are also dup'd so that the flags for the
* host file descriptor is independent of the other process.
*/
+ std::shared_ptr<FDArray> nfds = np->fds;
for (int tgt_fd = 0; tgt_fd < fds->getSize(); tgt_fd++) {
- std::shared_ptr<FDArray> nfds = np->fds;
std::shared_ptr<FDEntry> this_fde = (*fds)[tgt_fd];
if (!this_fde) {
nfds->setFDEntry(tgt_fd, nullptr);
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/17108
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: If7655b501bd819c39d35dea4c316b4b9ed3173a2
Gerrit-Change-Number: 17108
Gerrit-PatchSet: 1
Gerrit-Owner: Brandon Potter <brandon.pot...@amd.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev