diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2014-09-19 10:35:18 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2014-09-19 10:35:18 -0400 |
commit | 41fc8a573ea61b2463606a0714a9e563494da329 (patch) | |
tree | c038491b91eb89fa487781bca6ba5b6b1ba65ec3 /src/cpu/minor/lsq.hh | |
parent | 619c5519fe214250d537527ec95191a9b3d6fad2 (diff) | |
download | gem5-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/minor/lsq.hh')
-rw-r--r-- | src/cpu/minor/lsq.hh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cpu/minor/lsq.hh b/src/cpu/minor/lsq.hh index 183986826..7da2fd694 100644 --- a/src/cpu/minor/lsq.hh +++ b/src/cpu/minor/lsq.hh @@ -268,8 +268,8 @@ class LSQ : public Named { protected: /** TLB interace */ - void finish(Fault fault_, RequestPtr request_, ThreadContext *tc, - BaseTLB::Mode mode) + void finish(const Fault &fault_, RequestPtr request_, + ThreadContext *tc, BaseTLB::Mode mode) { } public: @@ -329,8 +329,8 @@ class LSQ : public Named { protected: /** TLB interace */ - void finish(Fault fault_, RequestPtr request_, ThreadContext *tc, - BaseTLB::Mode mode); + void finish(const Fault &fault_, RequestPtr request_, + ThreadContext *tc, BaseTLB::Mode mode); /** Has my only packet been sent to the memory system but has not * yet been responded to */ @@ -415,8 +415,8 @@ class LSQ : public Named protected: /** TLB response interface */ - void finish(Fault fault_, RequestPtr request_, ThreadContext *tc, - BaseTLB::Mode mode); + void finish(const Fault &fault_, RequestPtr request_, + ThreadContext *tc, BaseTLB::Mode mode); public: SplitDataRequest(LSQ &port_, MinorDynInstPtr inst_, |