base.cc (10194:e6d2e8083d9c) base.cc (10464:2a0fe8bca031)
1/*
2 * Copyright (c) 2011-2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

278 schedule(profileEvent, curTick());
279 }
280
281 if (params()->progress_interval) {
282 new CPUProgressEvent(this, params()->progress_interval);
283 }
284}
285
1/*
2 * Copyright (c) 2011-2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

278 schedule(profileEvent, curTick());
279 }
280
281 if (params()->progress_interval) {
282 new CPUProgressEvent(this, params()->progress_interval);
283 }
284}
285
286ProbePoints::PMUUPtr
287BaseCPU::pmuProbePoint(const char *name)
288{
289 ProbePoints::PMUUPtr ptr;
290 ptr.reset(new ProbePoints::PMU(getProbeManager(), name));
286
291
292 return ptr;
293}
294
287void
295void
296BaseCPU::regProbePoints()
297{
298 ppCycles = pmuProbePoint("Cycles");
299
300 ppRetiredInsts = pmuProbePoint("RetiredInsts");
301 ppRetiredLoads = pmuProbePoint("RetiredLoads");
302 ppRetiredStores = pmuProbePoint("RetiredStores");
303 ppRetiredBranches = pmuProbePoint("RetiredBranches");
304}
305
306void
307BaseCPU::probeInstCommit(const StaticInstPtr &inst)
308{
309 if (!inst->isMicroop() || inst->isLastMicroop())
310 ppRetiredInsts->notify(1);
311
312
313 if (inst->isLoad())
314 ppRetiredLoads->notify(1);
315
316 if (inst->isStore())
317 ppRetiredLoads->notify(1);
318
319 if (inst->isControl())
320 ppRetiredBranches->notify(1);
321}
322
323void
288BaseCPU::regStats()
289{
290 using namespace Stats;
291
292 numCycles
293 .name(name() + ".numCycles")
294 .desc("number of cpu cycles simulated")
295 ;

--- 325 unchanged lines hidden ---
324BaseCPU::regStats()
325{
326 using namespace Stats;
327
328 numCycles
329 .name(name() + ".numCycles")
330 .desc("number of cpu cycles simulated")
331 ;

--- 325 unchanged lines hidden ---