From e0074324bacf500f9d0cc11ebc6e2f29bf3d8ba1 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Thu, 16 Oct 2014 05:49:41 -0400 Subject: cpu: Probe points for basic PMU stats This changeset adds probe points that can be used to implement PMU counters for CPU stats. The following probes are supported: * BaseCPU::ppCycles / Cycles * BaseCPU::ppRetiredInsts / RetiredInsts * BaseCPU::ppRetiredLoads / RetiredLoads * BaseCPU::ppRetiredStores / RetiredStores * BaseCPU::ppRetiredBranches RetiredBranches --- src/cpu/minor/execute.cc | 2 ++ src/cpu/minor/pipeline.hh | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'src/cpu/minor') diff --git a/src/cpu/minor/execute.cc b/src/cpu/minor/execute.cc index 5679f55a7..5f840a273 100644 --- a/src/cpu/minor/execute.cc +++ b/src/cpu/minor/execute.cc @@ -853,6 +853,8 @@ Execute::doInstCommitAccounting(MinorDynInstPtr inst) /* Set the CP SeqNum to the numOps commit number */ if (inst->traceData) inst->traceData->setCPSeq(thread->numOp); + + cpu.probeInstCommit(inst->staticInst); } bool diff --git a/src/cpu/minor/pipeline.hh b/src/cpu/minor/pipeline.hh index 893efbf50..355a3c6c2 100644 --- a/src/cpu/minor/pipeline.hh +++ b/src/cpu/minor/pipeline.hh @@ -126,6 +126,11 @@ class Pipeline : public Ticked * stages and pipeline advance) */ void evaluate(); + void countCycles(Cycles delta) M5_ATTR_OVERRIDE + { + cpu.ppCycles->notify(delta); + } + void minorTrace() const; /** Functions below here are BaseCPU operations passed on to pipeline -- cgit v1.2.3