summaryrefslogtreecommitdiff
path: root/src/mem/ruby/profiler/AddressProfiler.hh
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2015-07-10 16:05:23 -0500
committerBrandon Potter <brandon.potter@amd.com>2015-07-10 16:05:23 -0500
commitf9a370f1728fe5d752fa6962ba23774eec8c883e (patch)
treea81a0331b75c72ec801d1ecf1ce62a8bc6f3d112 /src/mem/ruby/profiler/AddressProfiler.hh
parentc38f5098b152ea1e1dde96220d3f9e50d3411780 (diff)
downloadgem5-f9a370f1728fe5d752fa6962ba23774eec8c883e.tar.xz
ruby: replace global g_system_ptr with per-object pointers
This is another step in the process of removing global variables from Ruby to enable multiple RubySystem instances in a single simulation. With possibly multiple RubySystem objects, we can no longer use a global variable to find "the" RubySystem object. Instead, each Ruby component has to carry a pointer to the RubySystem object to which it belongs.
Diffstat (limited to 'src/mem/ruby/profiler/AddressProfiler.hh')
-rw-r--r--src/mem/ruby/profiler/AddressProfiler.hh8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mem/ruby/profiler/AddressProfiler.hh b/src/mem/ruby/profiler/AddressProfiler.hh
index 9bf1d517d..ff9b39e81 100644
--- a/src/mem/ruby/profiler/AddressProfiler.hh
+++ b/src/mem/ruby/profiler/AddressProfiler.hh
@@ -35,9 +35,9 @@
#include "mem/protocol/AccessType.hh"
#include "mem/protocol/RubyRequest.hh"
#include "mem/ruby/common/Address.hh"
-#include "mem/ruby/common/Global.hh"
#include "mem/ruby/common/Histogram.hh"
#include "mem/ruby/profiler/AccessTraceForAddress.hh"
+#include "mem/ruby/profiler/Profiler.hh"
class Set;
@@ -47,7 +47,7 @@ class AddressProfiler
typedef m5::hash_map<Address, AccessTraceForAddress> AddressMap;
public:
- AddressProfiler(int num_of_sequencers);
+ AddressProfiler(int num_of_sequencers, Profiler *profiler);
~AddressProfiler();
void printStats(std::ostream& out) const;
@@ -87,6 +87,8 @@ class AddressProfiler
Histogram m_getx_sharing_histogram;
Histogram m_gets_sharing_histogram;
+ Profiler *m_profiler;
+
//added by SS
bool m_hot_lines;
bool m_all_instructions;
@@ -100,7 +102,7 @@ AccessTraceForAddress& lookupTraceForAddress(const Address& addr,
void printSorted(std::ostream& out, int num_of_sequencers,
const AddressProfiler::AddressMap &record_map,
- std::string description);
+ std::string description, Profiler *profiler);
inline std::ostream&
operator<<(std::ostream& out, const AddressProfiler& obj)