From 41fc8a573ea61b2463606a0714a9e563494da329 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Fri, 19 Sep 2014 10:35:18 -0400 Subject: 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. --- src/sim/tlb.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sim/tlb.hh') 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 -- cgit v1.2.3