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/cpu/minor/fetch1.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cpu/minor/fetch1.hh') diff --git a/src/cpu/minor/fetch1.hh b/src/cpu/minor/fetch1.hh index 29a63d1f1..45977b310 100644 --- a/src/cpu/minor/fetch1.hh +++ b/src/cpu/minor/fetch1.hh @@ -163,8 +163,8 @@ class Fetch1 : public Named /** Interface for ITLB responses. Populates self and then passes * the request on to the ports' handleTLBResponse member * function */ - void finish(Fault fault_, RequestPtr request_, ThreadContext *tc, - BaseTLB::Mode mode); + void finish(const Fault &fault_, RequestPtr request_, + ThreadContext *tc, BaseTLB::Mode mode); public: FetchRequest(Fetch1 &fetch_, InstId id_, TheISA::PCState pc_) : -- cgit v1.2.3