diff options
author | Javier Bueno <javier.bueno@metempsy.com> | 2019-03-26 23:12:00 +0100 |
---|---|---|
committer | Javier Bueno Hedo <javier.bueno@metempsy.com> | 2019-03-28 20:57:22 +0000 |
commit | 1a27580e3bb113a0eca64a5075a00e45cc9cdd0d (patch) | |
tree | 301d84dbed9fe9ddeecd3feeb5d567fc7dd318eb /src/cpu/base.cc | |
parent | cbaae5478224beafea921005b102caa18ddb4606 (diff) | |
download | gem5-1a27580e3bb113a0eca64a5075a00e45cc9cdd0d.tar.xz |
cpu: Added a probe to notify the address of retired instructions
A probe is added to notify the address of each retired instruction.
Change-Id: Iefc1b09d74b3aa0aa5773b17ba637bf51f5a59c9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17632
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/cpu/base.cc')
-rw-r--r-- | src/cpu/base.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cpu/base.cc b/src/cpu/base.cc index 8dfcf3cda..8e49fb103 100644 --- a/src/cpu/base.cc +++ b/src/cpu/base.cc @@ -391,6 +391,7 @@ BaseCPU::regProbePoints() ppActiveCycles = pmuProbePoint("ActiveCycles"); ppRetiredInsts = pmuProbePoint("RetiredInsts"); + ppRetiredInstsPC = pmuProbePoint("RetiredInstsPC"); ppRetiredLoads = pmuProbePoint("RetiredLoads"); ppRetiredStores = pmuProbePoint("RetiredStores"); ppRetiredBranches = pmuProbePoint("RetiredBranches"); @@ -400,11 +401,12 @@ BaseCPU::regProbePoints() } void -BaseCPU::probeInstCommit(const StaticInstPtr &inst) +BaseCPU::probeInstCommit(const StaticInstPtr &inst, Addr pc) { - if (!inst->isMicroop() || inst->isLastMicroop()) + if (!inst->isMicroop() || inst->isLastMicroop()) { ppRetiredInsts->notify(1); - + ppRetiredInstsPC->notify(pc); + } if (inst->isLoad()) ppRetiredLoads->notify(1); |