1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 57 unchanged lines hidden (view full) ---

66#include "mem/ruby/system/MachineID.hh"
67#include "mem/protocol/PrefetchBit.hh"
68#include "mem/ruby/common/Address.hh"
69#include "mem/ruby/common/Set.hh"
70#include "mem/protocol/CacheRequestType.hh"
71#include "mem/protocol/GenericRequestType.hh"
72#include "mem/ruby/system/MemoryControl.hh"
73
74#include "params/RubyProfiler.hh"
75#include "sim/sim_object.hh"
76
77class CacheMsg;
78class AddressProfiler;
79
80template <class KEY_TYPE, class VALUE_TYPE> class Map;
81
82struct memory_control_profiler {
83 long long int m_memReq;
84 long long int m_memBankBusy;

--- 12 unchanged lines hidden (view full) ---

97 long long int m_memNotOld;
98 Vector<long long int> m_memBankCount;
99 int m_banks_per_rank;
100 int m_ranks_per_dimm;
101 int m_dimms_per_channel;
102};
103
104
102class Profiler : public Consumer {
105class Profiler : public SimObject, public Consumer {
106public:
107 // Constructors
105 Profiler(const string & name);
108 typedef RubyProfilerParams Params;
109 Profiler(const Params *);
110
111 void init(const vector<string> & argv, vector<string> memory_control_names);
112
113 // Destructor
114 ~Profiler();
115
116 // Public Methods
117 void wakeup();

--- 141 unchanged lines hidden (view full) ---

259
260 // added for MemoryControl:
261 //added by SS
262 map< string, memory_control_profiler* > m_memory_control_profilers;
263
264 //added by SS
265 bool m_hot_lines;
266 bool m_all_instructions;
263 string m_name;
264
267};
268
269// Output operator declaration
270ostream& operator<<(ostream& out, const Profiler& obj);
271
272// ******************* Definitions *******************
273
274// Output operator definition
275extern inline
276ostream& operator<<(ostream& out, const Profiler& obj)
277{
278 obj.print(out);
279 out << flush;
280 return out;
281}
282
283#endif //PROFILER_H
284
285