system.hh (8601:af28085882dc) | system.hh (8666:97d873b8b13e) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * Copyright (c) 2011 Regents of the University of California 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 157 unchanged lines hidden (view full) --- 166 167 168#endif // FULL_SYSTEM 169 170 protected: 171 Enums::MemoryMode memoryMode; 172 uint64_t workItemsBegin; 173 uint64_t workItemsEnd; | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * Copyright (c) 2011 Regents of the University of California 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 157 unchanged lines hidden (view full) --- 166 167 168#endif // FULL_SYSTEM 169 170 protected: 171 Enums::MemoryMode memoryMode; 172 uint64_t workItemsBegin; 173 uint64_t workItemsEnd; |
174 uint32_t numWorkIds; |
|
174 std::vector<bool> activeCpus; 175 176 public: | 175 std::vector<bool> activeCpus; 176 177 public: |
178 virtual void regStats(); |
|
177 /** 178 * Called by pseudo_inst to track the number of work items started by this 179 * system. 180 */ | 179 /** 180 * Called by pseudo_inst to track the number of work items started by this 181 * system. 182 */ |
181 uint64_t | 183 uint64_t |
182 incWorkItemsBegin() 183 { 184 return ++workItemsBegin; 185 } 186 187 /** 188 * Called by pseudo_inst to track the number of work items completed by 189 * this system. --- 17 unchanged lines hidden (view full) --- 207 activeCpus[index] = true; 208 for (std::vector<bool>::iterator i = activeCpus.begin(); 209 i < activeCpus.end(); i++) { 210 if (*i) count++; 211 } 212 return count; 213 } 214 | 184 incWorkItemsBegin() 185 { 186 return ++workItemsBegin; 187 } 188 189 /** 190 * Called by pseudo_inst to track the number of work items completed by 191 * this system. --- 17 unchanged lines hidden (view full) --- 209 activeCpus[index] = true; 210 for (std::vector<bool>::iterator i = activeCpus.begin(); 211 i < activeCpus.end(); i++) { 212 if (*i) count++; 213 } 214 return count; 215 } 216 |
217 inline void workItemBegin(uint32_t tid, uint32_t workid) 218 { 219 std::pair<uint32_t,uint32_t> p(tid, workid); 220 lastWorkItemStarted[p] = curTick(); 221 } 222 223 void workItemEnd(uint32_t tid, uint32_t workid); 224 |
|
215#if FULL_SYSTEM 216 /** 217 * Fix up an address used to match PCs for hooking simulator 218 * events on to target function executions. See comment in 219 * system.cc for details. 220 */ 221 virtual Addr fixFuncEventAddr(Addr addr) = 0; 222 --- 75 unchanged lines hidden (view full) --- 298 299 void serialize(std::ostream &os); 300 void unserialize(Checkpoint *cp, const std::string §ion); 301 virtual void resume(); 302 303 public: 304 Counter totalNumInsts; 305 EventQueue instEventQueue; | 225#if FULL_SYSTEM 226 /** 227 * Fix up an address used to match PCs for hooking simulator 228 * events on to target function executions. See comment in 229 * system.cc for details. 230 */ 231 virtual Addr fixFuncEventAddr(Addr addr) = 0; 232 --- 75 unchanged lines hidden (view full) --- 308 309 void serialize(std::ostream &os); 310 void unserialize(Checkpoint *cp, const std::string §ion); 311 virtual void resume(); 312 313 public: 314 Counter totalNumInsts; 315 EventQueue instEventQueue; |
316 std::map<std::pair<uint32_t,uint32_t>, Tick> lastWorkItemStarted; 317 std::map<uint32_t, Stats::Histogram*> workItemStats; |
|
306 307 //////////////////////////////////////////// 308 // 309 // STATIC GLOBAL SYSTEM LIST 310 // 311 //////////////////////////////////////////// 312 313 static std::vector<System *> systemList; 314 static int numSystemsRunning; 315 316 static void printSystems(); 317 318 319}; 320 321#endif // __SYSTEM_HH__ | 318 319 //////////////////////////////////////////// 320 // 321 // STATIC GLOBAL SYSTEM LIST 322 // 323 //////////////////////////////////////////// 324 325 static std::vector<System *> systemList; 326 static int numSystemsRunning; 327 328 static void printSystems(); 329 330 331}; 332 333#endif // __SYSTEM_HH__ |