Deleted Added
sdiff udiff text old ( 6876:a658c315512c ) new ( 6889:323cd43a3c46 )
full compact
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;
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:
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);
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
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;
267};
268
269// Output operator declaration
270ostream& operator<<(ostream& out, const Profiler& obj);

--- 15 unchanged lines hidden ---