diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2012-06-05 01:23:08 -0400 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2012-06-05 01:23:08 -0400 |
commit | 1b370431d0ac51eb54bfbf17247f935d48995a34 (patch) | |
tree | e9b90a8f9bdf914f29a20b3c287dae5b5a16db4c /src/mem | |
parent | d6997777bee827c89578cf730b186991485c647c (diff) | |
download | gem5-1b370431d0ac51eb54bfbf17247f935d48995a34.tar.xz |
sim: Remove FastAlloc
While FastAlloc provides a small performance increase (~1.5%) over regular malloc it isn't thread safe.
After removing FastAlloc and using tcmalloc I've seen a performance increase of 12% over libc malloc
when running twolf for ARM.
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/bridge.hh | 3 | ||||
-rw-r--r-- | src/mem/cache/cache_impl.hh | 3 | ||||
-rw-r--r-- | src/mem/packet.hh | 5 | ||||
-rw-r--r-- | src/mem/request.hh | 5 |
4 files changed, 6 insertions, 10 deletions
diff --git a/src/mem/bridge.hh b/src/mem/bridge.hh index 7342f4a9f..4595cf516 100644 --- a/src/mem/bridge.hh +++ b/src/mem/bridge.hh @@ -55,7 +55,6 @@ #include <queue> #include <string> -#include "base/fast_alloc.hh" #include "base/types.hh" #include "mem/mem_object.hh" #include "mem/packet.hh" @@ -85,7 +84,7 @@ class Bridge : public MemObject * state and original source. It has enough information to also * restore the response once it comes back to the bridge. */ - class RequestState : public Packet::SenderState, public FastAlloc + class RequestState : public Packet::SenderState { public: diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index 3b9bfd35a..942ac59ec 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -50,7 +50,6 @@ * Cache definitions. */ -#include "base/fast_alloc.hh" #include "base/misc.hh" #include "base/range.hh" #include "base/types.hh" @@ -349,7 +348,7 @@ Cache<TagStore>::access(PacketPtr pkt, BlkType *&blk, } -class ForwardResponseRecord : public Packet::SenderState, public FastAlloc +class ForwardResponseRecord : public Packet::SenderState { Packet::SenderState *prevSenderState; PortID prevSrc; diff --git a/src/mem/packet.hh b/src/mem/packet.hh index 8e3ef9456..cdcefcadb 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -58,7 +58,6 @@ #include "base/cast.hh" #include "base/compiler.hh" -#include "base/fast_alloc.hh" #include "base/flags.hh" #include "base/misc.hh" #include "base/printable.hh" @@ -227,7 +226,7 @@ class MemCmd * ultimate destination and back, possibly being conveyed by several * different Packets along the way.) */ -class Packet : public FastAlloc, public Printable +class Packet : public Printable { public: typedef uint32_t FlagsType; @@ -358,7 +357,7 @@ class Packet : public FastAlloc, public Printable * Object used to maintain state of a PrintReq. The senderState * field of a PrintReq should always be of this type. */ - class PrintReqState : public SenderState, public FastAlloc + class PrintReqState : public SenderState { private: /** diff --git a/src/mem/request.hh b/src/mem/request.hh index 68ef0540a..f6406e2c5 100644 --- a/src/mem/request.hh +++ b/src/mem/request.hh @@ -42,7 +42,6 @@ #include <cassert> #include <climits> -#include "base/fast_alloc.hh" #include "base/flags.hh" #include "base/misc.hh" #include "base/types.hh" @@ -53,7 +52,7 @@ class Request; typedef Request* RequestPtr; typedef uint16_t MasterID; -class Request : public FastAlloc +class Request { public: typedef uint32_t FlagsType; @@ -229,7 +228,7 @@ class Request : public FastAlloc setThreadContext(cid, tid); } - ~Request() {} // for FastAlloc + ~Request() {} /** * Set up CPU and thread numbers. |