summaryrefslogtreecommitdiff
path: root/src/cpu/o3/fetch.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2014-09-19 10:35:18 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2014-09-19 10:35:18 -0400
commit41fc8a573ea61b2463606a0714a9e563494da329 (patch)
treec038491b91eb89fa487781bca6ba5b6b1ba65ec3 /src/cpu/o3/fetch.hh
parent619c5519fe214250d537527ec95191a9b3d6fad2 (diff)
downloadgem5-41fc8a573ea61b2463606a0714a9e563494da329.tar.xz
arch: Pass faults by const reference where possible
This patch changes how faults are passed between methods in an attempt to copy as few reference-counting pointer instances as possible. This should avoid unecessary copies being created, contributing to the increment/decrement of the reference counters.
Diffstat (limited to 'src/cpu/o3/fetch.hh')
-rw-r--r--src/cpu/o3/fetch.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cpu/o3/fetch.hh b/src/cpu/o3/fetch.hh
index 4d01610d9..968d94029 100644
--- a/src/cpu/o3/fetch.hh
+++ b/src/cpu/o3/fetch.hh
@@ -100,7 +100,7 @@ class DefaultFetch
{}
void
- finish(Fault fault, RequestPtr req, ThreadContext *tc,
+ finish(const Fault &fault, RequestPtr req, ThreadContext *tc,
BaseTLB::Mode mode)
{
assert(mode == BaseTLB::Execute);
@@ -294,7 +294,7 @@ class DefaultFetch
* @return Any fault that occured.
*/
bool fetchCacheLine(Addr vaddr, ThreadID tid, Addr pc);
- void finishTranslation(Fault fault, RequestPtr mem_req);
+ void finishTranslation(const Fault &fault, RequestPtr mem_req);
/** Check if an interrupt is pending and that we need to handle