summaryrefslogtreecommitdiff
path: root/src/base/fast_alloc.hh
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2009-01-08 14:13:33 -0800
committerSteve Reinhardt <steve.reinhardt@amd.com>2009-01-08 14:13:33 -0800
commitc370a9cb9884f54a54450c9073555ed53ecdbacc (patch)
tree749ae611618a7667e455ff364f662f841c9261af /src/base/fast_alloc.hh
parentfff9c93568d73dcb2d237f0386dc7323412ff710 (diff)
downloadgem5-c370a9cb9884f54a54450c9073555ed53ecdbacc.tar.xz
FastAlloc: track allocation tick in debug mode,
minor enhancements to debug output
Diffstat (limited to 'src/base/fast_alloc.hh')
-rw-r--r--src/base/fast_alloc.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/base/fast_alloc.hh b/src/base/fast_alloc.hh
index 775c93d50..c6490174e 100644
--- a/src/base/fast_alloc.hh
+++ b/src/base/fast_alloc.hh
@@ -74,6 +74,10 @@ class FastAlloc
#else
+#if FAST_ALLOC_DEBUG
+#include "sim/host.hh" // for Tick
+#endif
+
class FastAlloc
{
public:
@@ -127,6 +131,7 @@ class FastAlloc
bool inUse; // in-use flag
FastAlloc *inUsePrev; // ptrs to build list of in-use objects
FastAlloc *inUseNext;
+ Tick whenAllocated;
// static (global) debugging vars
static int numInUse; // count in-use objects
@@ -137,6 +142,7 @@ class FastAlloc
// versions that might be more agreeable to call from gdb)
static void dump_summary();
static void dump_oldest(int n);
+ static void dump_oldest_of_type(int n, const char *type_name);
#endif
};