Profiler.hh (6876:a658c315512c) Profiler.hh (6889:323cd43a3c46)
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;

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

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 {
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;

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

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;
85 long long int m_memBusBusy;
86 long long int m_memTfawBusy;
87 long long int m_memReadWriteBusy;
88 long long int m_memDataBusBusy;
89 long long int m_memRefresh;
90 long long int m_memRead;
91 long long int m_memWrite;
92 long long int m_memWaitCycles;
93 long long int m_memInputQ;
94 long long int m_memBankQ;
95 long long int m_memArbWait;
96 long long int m_memRandBusy;
97 long long int m_memNotOld;
98 Vector<long long int> m_memBankCount;
83 uint64 m_memReq;
84 uint64 m_memBankBusy;
85 uint64 m_memBusBusy;
86 uint64 m_memTfawBusy;
87 uint64 m_memReadWriteBusy;
88 uint64 m_memDataBusBusy;
89 uint64 m_memRefresh;
90 uint64 m_memRead;
91 uint64 m_memWrite;
92 uint64 m_memWaitCycles;
93 uint64 m_memInputQ;
94 uint64 m_memBankQ;
95 uint64 m_memArbWait;
96 uint64 m_memRandBusy;
97 uint64 m_memNotOld;
98 Vector<uint64> m_memBankCount;
99 int m_banks_per_rank;
100 int m_ranks_per_dimm;
101 int m_dimms_per_channel;
102};
103
104
105class Profiler : public SimObject, public Consumer {
106public:
107 // Constructors
108 typedef RubyProfilerParams Params;
109 Profiler(const Params *);
110
99 int m_banks_per_rank;
100 int m_ranks_per_dimm;
101 int m_dimms_per_channel;
102};
103
104
105class Profiler : public SimObject, public Consumer {
106public:
107 // Constructors
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();
118
119 void setPeriodicStatsFile(const string& filename);
120 void setPeriodicStatsInterval(integer_t period);

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

168 bool watchAddress(Address addr);
169
170 // return Ruby's start time
171 Time getRubyStartTime(){
172 return m_ruby_start;
173 }
174
175 // added for MemoryControl:
111 // Destructor
112 ~Profiler();
113
114 // Public Methods
115 void wakeup();
116
117 void setPeriodicStatsFile(const string& filename);
118 void setPeriodicStatsInterval(integer_t period);

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

166 bool watchAddress(Address addr);
167
168 // return Ruby's start time
169 Time getRubyStartTime(){
170 return m_ruby_start;
171 }
172
173 // added for MemoryControl:
176 void profileMemReq(string name, int bank);
177 void profileMemBankBusy(string name);
178 void profileMemBusBusy(string name);
179 void profileMemTfawBusy(string name);
180 void profileMemReadWriteBusy(string name);
181 void profileMemDataBusBusy(string name);
182 void profileMemRefresh(string name);
183 void profileMemRead(string name);
184 void profileMemWrite(string name);
185 void profileMemWaitCycles(string name, int cycles);
186 void profileMemInputQ(string name, int cycles);
187 void profileMemBankQ(string name, int cycles);
188 void profileMemArbWait(string name, int cycles);
189 void profileMemRandBusy(string name);
190 void profileMemNotOld(string name);
174 void profileMemReq(int mem_cntrl, int bank);
175 void profileMemBankBusy(int mem_cntrl);
176 void profileMemBusBusy(int mem_cntrl);
177 void profileMemTfawBusy(int mem_cntrl);
178 void profileMemReadWriteBusy(int mem_cntrl);
179 void profileMemDataBusBusy(int mem_cntrl);
180 void profileMemRefresh(int mem_cntrl);
181 void profileMemRead(int mem_cntrl);
182 void profileMemWrite(int mem_cntrl);
183 void profileMemWaitCycles(int mem_cntrl, int cycles);
184 void profileMemInputQ(int mem_cntrl, int cycles);
185 void profileMemBankQ(int mem_cntrl, int cycles);
186 void profileMemArbWait(int mem_cntrl, int cycles);
187 void profileMemRandBusy(int mem_cntrl);
188 void profileMemNotOld(int mem_cntrl);
191 //added by SS
192 bool getHotLines() { return m_hot_lines; }
193 bool getAllInstructions() { return m_all_instructions; }
194
195private:
196 //added by SS
197 vector<string> m_memory_control_names;
198

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

254
255 Map<Address, int>* m_watch_address_list_ptr;
256 // counts all initiated cache request including PUTs
257 int m_requests;
258 Map <string, int>* m_requestProfileMap_ptr;
259
260 // added for MemoryControl:
261 //added by SS
189 //added by SS
190 bool getHotLines() { return m_hot_lines; }
191 bool getAllInstructions() { return m_all_instructions; }
192
193private:
194 //added by SS
195 vector<string> m_memory_control_names;
196

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

252
253 Map<Address, int>* m_watch_address_list_ptr;
254 // counts all initiated cache request including PUTs
255 int m_requests;
256 Map <string, int>* m_requestProfileMap_ptr;
257
258 // added for MemoryControl:
259 //added by SS
262 map< string, memory_control_profiler* > m_memory_control_profilers;
260 Vector < memory_control_profiler* > m_mc_profilers;
263
264 //added by SS
265 bool m_hot_lines;
266 bool m_all_instructions;
267};
268
269// Output operator declaration
270ostream& operator<<(ostream& out, const Profiler& obj);

--- 15 unchanged lines hidden ---
261
262 //added by SS
263 bool m_hot_lines;
264 bool m_all_instructions;
265};
266
267// Output operator declaration
268ostream& operator<<(ostream& out, const Profiler& obj);

--- 15 unchanged lines hidden ---