summaryrefslogtreecommitdiff
path: root/src/mem/cache/mshr_queue.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2013-05-30 12:54:11 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2013-05-30 12:54:11 -0400
commit7da851d1a834fbe6dd02f87884586129786b14a6 (patch)
treeba426b7526b9480c38ebead26fc320f7fcbec347 /src/mem/cache/mshr_queue.hh
parent42191522cc16f0f1c98455e52681a928cba4052a (diff)
downloadgem5-7da851d1a834fbe6dd02f87884586129786b14a6.tar.xz
mem: Spring cleaning of MSHR and MSHRQueue
This patch does some minor tidying up of the MSHR and MSHRQueue. The clean up started as part of some ad-hoc tracing and debugging, but seems worthwhile enough to go in as a separate patch. The highlights of the changes are reduced scoping (private) members where possible, avoiding redundant new/delete, and constructor initialisation to please static code analyzers.
Diffstat (limited to 'src/mem/cache/mshr_queue.hh')
-rw-r--r--src/mem/cache/mshr_queue.hh23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/mem/cache/mshr_queue.hh b/src/mem/cache/mshr_queue.hh
index 44e1c5bd3..726aa6b8e 100644
--- a/src/mem/cache/mshr_queue.hh
+++ b/src/mem/cache/mshr_queue.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012 ARM Limited
+ * Copyright (c) 2012-2013 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
@@ -63,15 +63,6 @@ class MSHRQueue : public Drainable
/** Local label (for functional print requests) */
const std::string label;
- /** MSHR storage. */
- MSHR *registers;
- /** Holds pointers to all allocated entries. */
- MSHR::List allocatedList;
- /** Holds pointers to entries that haven't been sent to the bus. */
- MSHR::List readyList;
- /** Holds non allocated entries. */
- MSHR::List freeList;
-
// Parameters
/**
* The total number of entries in this queue. This number is set as the
@@ -86,6 +77,15 @@ class MSHRQueue : public Drainable
*/
const int numReserve;
+ /** MSHR storage. */
+ std::vector<MSHR> registers;
+ /** Holds pointers to all allocated entries. */
+ MSHR::List allocatedList;
+ /** Holds pointers to entries that haven't been sent to the bus. */
+ MSHR::List readyList;
+ /** Holds non allocated entries. */
+ MSHR::List freeList;
+
/** Drain manager to inform of a completed drain */
DrainManager *drainManager;
@@ -110,9 +110,6 @@ class MSHRQueue : public Drainable
MSHRQueue(const std::string &_label, int num_entries, int reserve,
int index);
- /** Destructor */
- ~MSHRQueue();
-
/**
* Find the first MSHR that matches the provided address.
* @param addr The address to find.