Hanhwi Jang has uploaded this change for review. ( https://gem5-review.googlesource.com/7481

Change subject: cpu-o3: Missing freeing the heads of DepGraph in IQ squashing
......................................................................

cpu-o3: Missing freeing the heads of DepGraph in IQ squashing

Free the squahsed instructions' heads of DepGraph in IQ squashing

In a system with large register file (ex.2048), the number of
DynInst hits the hardcoded limit (1500). This is caused by
missing freeing the heads of DepGraph in IQ. IQ only clears
out the heads when instructions reach writeback stage.
If a instruction is squashed before writeback stage, its head of
dependency graph, which holds the instruction's DynInstPtr,
wouldnot be clared out. This prevents freeing the DynInst of the
squahsed instruction even after it is committed.

Change-Id: I05b3db93cb6ad8960183d7ae765149c7f292e5b3
---
M src/cpu/o3/inst_queue_impl.hh
1 file changed, 19 insertions(+), 0 deletions(-)



diff --git a/src/cpu/o3/inst_queue_impl.hh b/src/cpu/o3/inst_queue_impl.hh
index f70f662..f4df57b 100644
--- a/src/cpu/o3/inst_queue_impl.hh
+++ b/src/cpu/o3/inst_queue_impl.hh
@@ -1338,6 +1338,25 @@
             ++freeEntries;
         }

+        // IQ clears out the heads of the dependency graph only when
+        // instructions reach writeback stage. If a instruction is squashed
+ // before writeback stage, its head of dependency graph would not be + // cleared out; it holds the instructions's DynInstPtr. This prevents
+        // freeing the squashed instruction's DynInst.
+ // Thus, we need to manually clear out the squahsed instructions' heads
+        // of dependency graph.
+        for (int dest_reg_idx = 0;
+             dest_reg_idx < squashed_inst->numDestRegs();
+             dest_reg_idx++)
+        {
+            PhysRegIdPtr dest_reg =
+                squashed_inst->renamedDestRegIdx(dest_reg_idx);
+            if (dest_reg->isFixedMapping()){
+                continue;
+            }
+            assert(dependGraph.empty(dest_reg->flatIndex()));
+            dependGraph.clearInst(dest_reg->flatIndex());
+        }
         instList[tid].erase(squash_it--);
         ++iqSquashedInstsExamined;
     }

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

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I05b3db93cb6ad8960183d7ae765149c7f292e5b3
Gerrit-Change-Number: 7481
Gerrit-PatchSet: 1
Gerrit-Owner: Hanhwi Jang <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to