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/sim/tlb.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/sim/tlb.hh')
-rw-r--r-- | src/sim/tlb.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sim/tlb.hh b/src/sim/tlb.hh index 397d6e0f2..6296602a0 100644 --- a/src/sim/tlb.hh +++ b/src/sim/tlb.hh @@ -104,8 +104,8 @@ class BaseTLB : public SimObject * be responsible for cleaning itself up which will happen in this * function. Once it's called, the object is no longer valid. */ - virtual void finish(Fault fault, RequestPtr req, ThreadContext *tc, - Mode mode) = 0; + virtual void finish(const Fault &fault, RequestPtr req, + ThreadContext *tc, Mode mode) = 0; /** This function is used by the page table walker to determine if it * should translate the a pending request or if the underlying request |