1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 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; --- 168 unchanged lines hidden (view full) --- 177 Counter numInst; 178 Counter startNumInst; 179 Stats::Scalar numInsts; 180 181 void countInst() 182 { 183 numInst++; 184 numInsts++; |
185 system->totalNumInsts++; |
186 thread->funcExeInst++; 187 } 188 189 virtual Counter totalInstructions() const 190 { 191 return numInst - startNumInst; 192 } 193 |
194 //number of integer alu accesses 195 Stats::Scalar numIntAluAccesses; 196 197 //number of float alu accesses 198 Stats::Scalar numFpAluAccesses; 199 200 //number of function calls/returns 201 Stats::Scalar numCallsReturns; 202 203 //conditional control instructions; 204 Stats::Scalar numCondCtrlInsts; 205 206 //number of int instructions 207 Stats::Scalar numIntInsts; 208 209 //number of float instructions 210 Stats::Scalar numFpInsts; 211 212 //number of integer register file accesses 213 Stats::Scalar numIntRegReads; 214 Stats::Scalar numIntRegWrites; 215 216 //number of float register file accesses 217 Stats::Scalar numFpRegReads; 218 Stats::Scalar numFpRegWrites; 219 |
220 // number of simulated memory references 221 Stats::Scalar numMemRefs; |
222 Stats::Scalar numLoadInsts; 223 Stats::Scalar numStoreInsts; |
224 |
225 // number of idle cycles 226 Stats::Formula numIdleCycles; 227 228 // number of busy cycles 229 Stats::Formula numBusyCycles; 230 |
231 // number of simulated loads 232 Counter numLoad; 233 Counter startNumLoad; 234 235 // number of idle cycles 236 Stats::Average notIdleFraction; 237 Stats::Formula idleFraction; 238 --- 30 unchanged lines hidden (view full) --- 269 // raw pointer to the StaticInst is provided instead of a 270 // ref-counted StaticInstPtr to redice overhead. This is fine as 271 // long as these methods don't copy the pointer into any long-term 272 // storage (which is pretty hard to imagine they would have reason 273 // to do). 274 275 uint64_t readIntRegOperand(const StaticInst *si, int idx) 276 { |
277 numIntRegReads++; |
278 return thread->readIntReg(si->srcRegIdx(idx)); 279 } 280 281 FloatReg readFloatRegOperand(const StaticInst *si, int idx) 282 { |
283 numFpRegReads++; |
284 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag; 285 return thread->readFloatReg(reg_idx); 286 } 287 288 FloatRegBits readFloatRegOperandBits(const StaticInst *si, int idx) 289 { |
290 numFpRegReads++; |
291 int reg_idx = si->srcRegIdx(idx) - TheISA::FP_Base_DepTag; 292 return thread->readFloatRegBits(reg_idx); 293 } 294 295 void setIntRegOperand(const StaticInst *si, int idx, uint64_t val) 296 { |
297 numIntRegWrites++; |
298 thread->setIntReg(si->destRegIdx(idx), val); 299 } 300 301 void setFloatRegOperand(const StaticInst *si, int idx, FloatReg val) 302 { |
303 numFpRegWrites++; |
304 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag; 305 thread->setFloatReg(reg_idx, val); 306 } 307 308 void setFloatRegOperandBits(const StaticInst *si, int idx, 309 FloatRegBits val) 310 { |
311 numFpRegWrites++; |
312 int reg_idx = si->destRegIdx(idx) - TheISA::FP_Base_DepTag; 313 thread->setFloatRegBits(reg_idx, val); 314 } 315 316 bool readPredicate() { return thread->readPredicate(); } 317 void setPredicate(bool val) 318 { 319 thread->setPredicate(val); --- 9 unchanged lines hidden (view full) --- 329 330 MiscReg readMiscRegNoEffect(int misc_reg) 331 { 332 return thread->readMiscRegNoEffect(misc_reg); 333 } 334 335 MiscReg readMiscReg(int misc_reg) 336 { |
337 numIntRegReads++; |
338 return thread->readMiscReg(misc_reg); 339 } 340 341 void setMiscReg(int misc_reg, const MiscReg &val) 342 { |
343 numIntRegWrites++; |
344 return thread->setMiscReg(misc_reg, val); 345 } 346 347 MiscReg readMiscRegOperand(const StaticInst *si, int idx) 348 { |
349 numIntRegReads++; |
350 int reg_idx = si->srcRegIdx(idx) - TheISA::Ctrl_Base_DepTag; 351 return thread->readMiscReg(reg_idx); 352 } 353 354 void setMiscRegOperand( 355 const StaticInst *si, int idx, const MiscReg &val) 356 { |
357 numIntRegWrites++; |
358 int reg_idx = si->destRegIdx(idx) - TheISA::Ctrl_Base_DepTag; 359 return thread->setMiscReg(reg_idx, val); 360 } 361 362 void demapPage(Addr vaddr, uint64_t asn) 363 { 364 thread->demapPage(vaddr, asn); 365 } --- 46 unchanged lines hidden --- |