system.hh (7897:d9e8b1fd1a9f) | system.hh (7914:eee5bb0fb8ea) |
---|---|
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 --- 147 unchanged lines hidden (view full) --- 156 /** Amount of physical memory that exists */ 157 Addr memSize(); 158 159 160#endif // FULL_SYSTEM 161 162 protected: 163 Enums::MemoryMode memoryMode; | 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 --- 147 unchanged lines hidden (view full) --- 156 /** Amount of physical memory that exists */ 157 Addr memSize(); 158 159 160#endif // FULL_SYSTEM 161 162 protected: 163 Enums::MemoryMode memoryMode; |
164 uint64_t workItemsBegin; 165 uint64_t workItemsEnd; 166 std::vector<bool> activeCpus; |
|
164 | 167 |
168 public: 169 /** 170 * Called by pseudo_inst to track the number of work items started by this 171 * system. 172 */ 173 uint64_t 174 incWorkItemsBegin() 175 { 176 return ++workItemsBegin; 177 } 178 179 /** 180 * Called by pseudo_inst to track the number of work items completed by 181 * this system. 182 */ 183 uint64_t 184 incWorkItemsEnd() 185 { 186 return ++workItemsEnd; 187 } 188 189 /** 190 * Called by pseudo_inst to mark the cpus actively executing work items. 191 * Returns the total number of cpus that have executed work item begin or 192 * ends. 193 */ 194 int 195 markWorkItem(int index) 196 { 197 int count = 0; 198 assert(index < activeCpus.size()); 199 activeCpus[index] = true; 200 for (std::vector<bool>::iterator i = activeCpus.begin(); 201 i < activeCpus.end(); i++) { 202 if (*i) count++; 203 } 204 return count; 205 } 206 |
|
165#if FULL_SYSTEM 166 /** 167 * Fix up an address used to match PCs for hooking simulator 168 * events on to target function executions. See comment in 169 * system.cc for details. 170 */ 171 virtual Addr fixFuncEventAddr(Addr addr) = 0; 172 --- 97 unchanged lines hidden --- | 207#if FULL_SYSTEM 208 /** 209 * Fix up an address used to match PCs for hooking simulator 210 * events on to target function executions. See comment in 211 * system.cc for details. 212 */ 213 virtual Addr fixFuncEventAddr(Addr addr) = 0; 214 --- 97 unchanged lines hidden --- |