[gem5-dev] Change in gem5/gem5[master]: cpu: Added a probe to notify the address of retired instructions

2019-03-28 Thread Javier Bueno Hedo (Gerrit)
Javier Bueno Hedo has submitted this change and it was merged. (  
https://gem5-review.googlesource.com/c/public/gem5/+/17632 )


Change subject: cpu: Added a probe to notify the address of retired  
instructions

..

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 
Reviewed-by: Andreas Sandberg 
Maintainer: Andreas Sandberg 
---
M src/cpu/base.cc
M src/cpu/base.hh
M src/cpu/minor/execute.cc
M src/cpu/o3/cpu.cc
M src/cpu/simple/base.cc
5 files changed, 11 insertions(+), 7 deletions(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
  Nikos Nikoleris: Looks good to me, approved



diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index 8dfcf3c..8e49fb1 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -391,6 +391,7 @@
 ppActiveCycles = pmuProbePoint("ActiveCycles");

 ppRetiredInsts = pmuProbePoint("RetiredInsts");
+ppRetiredInstsPC = pmuProbePoint("RetiredInstsPC");
 ppRetiredLoads = pmuProbePoint("RetiredLoads");
 ppRetiredStores = pmuProbePoint("RetiredStores");
 ppRetiredBranches = pmuProbePoint("RetiredBranches");
@@ -400,11 +401,12 @@
 }

 void
-BaseCPU::probeInstCommit(const StaticInstPtr )
+BaseCPU::probeInstCommit(const StaticInstPtr , Addr pc)
 {
-if (!inst->isMicroop() || inst->isLastMicroop())
+if (!inst->isMicroop() || inst->isLastMicroop()) {
 ppRetiredInsts->notify(1);
-
+ppRetiredInstsPC->notify(pc);
+}

 if (inst->isLoad())
 ppRetiredLoads->notify(1);
diff --git a/src/cpu/base.hh b/src/cpu/base.hh
index 9075d4b..f9b24b9 100644
--- a/src/cpu/base.hh
+++ b/src/cpu/base.hh
@@ -487,8 +487,9 @@
  * instruction.
  *
  * @param inst Instruction that just committed
+ * @param pc PC of the instruction that just committed
  */
-virtual void probeInstCommit(const StaticInstPtr );
+virtual void probeInstCommit(const StaticInstPtr , Addr pc);

protected:
 /**
@@ -509,6 +510,7 @@
  * instructions may call notify once for the entire bundle.
  */
 ProbePoints::PMUUPtr ppRetiredInsts;
+ProbePoints::PMUUPtr ppRetiredInstsPC;

 /** Retired load instructions */
 ProbePoints::PMUUPtr ppRetiredLoads;
diff --git a/src/cpu/minor/execute.cc b/src/cpu/minor/execute.cc
index 6a41820..47f3cbc 100644
--- a/src/cpu/minor/execute.cc
+++ b/src/cpu/minor/execute.cc
@@ -872,7 +872,7 @@
 if (inst->traceData)
 inst->traceData->setCPSeq(thread->numOp);

-cpu.probeInstCommit(inst->staticInst);
+cpu.probeInstCommit(inst->staticInst, inst->pc.instAddr());
 }

 bool
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 965ab04..9da5b43 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -1623,7 +1623,7 @@
 thread[tid]->numOps++;
 committedOps[tid]++;

-probeInstCommit(inst->staticInst);
+probeInstCommit(inst->staticInst, inst->instAddr());
 }

 template 
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc
index 422c732..b243dcc 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -661,7 +661,7 @@
 }

 // Call CPU instruction commit probes
-probeInstCommit(curStaticInst);
+probeInstCommit(curStaticInst, instAddr);
 }

 void

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/17632
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Iefc1b09d74b3aa0aa5773b17ba637bf51f5a59c9
Gerrit-Change-Number: 17632
Gerrit-PatchSet: 3
Gerrit-Owner: Javier Bueno Hedo 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Javier Bueno Hedo 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-MessageType: merged
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: cpu: Added a probe to notify the address of retired instructions

2019-03-27 Thread Javier Bueno Hedo (Gerrit)

Hello Daniel Carvalho,

I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/17632

to look at the new patch set (#2).

Change subject: cpu: Added a probe to notify the address of retired  
instructions

..

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
---
M src/cpu/base.cc
M src/cpu/base.hh
M src/cpu/minor/execute.cc
M src/cpu/o3/cpu.cc
M src/cpu/simple/base.cc
5 files changed, 11 insertions(+), 7 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/17632
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Iefc1b09d74b3aa0aa5773b17ba637bf51f5a59c9
Gerrit-Change-Number: 17632
Gerrit-PatchSet: 2
Gerrit-Owner: Javier Bueno Hedo 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-MessageType: newpatchset
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: cpu: Added a probe to notify the address of retired instructions

2019-03-26 Thread Javier Bueno Hedo (Gerrit)
Javier Bueno Hedo has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/17632



Change subject: cpu: Added a probe to notify the address of retired  
instructions

..

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
---
M src/cpu/base.cc
M src/cpu/base.hh
M src/cpu/minor/execute.cc
M src/cpu/o3/cpu.cc
M src/cpu/simple/base.cc
5 files changed, 12 insertions(+), 5 deletions(-)



diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index 8dfcf3c..0f239d8 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -391,6 +391,7 @@
 ppActiveCycles = pmuProbePoint("ActiveCycles");

 ppRetiredInsts = pmuProbePoint("RetiredInsts");
+ppRetiredInstsPC = pmuProbePoint("RetiredInstsPC");
 ppRetiredLoads = pmuProbePoint("RetiredLoads");
 ppRetiredStores = pmuProbePoint("RetiredStores");
 ppRetiredBranches = pmuProbePoint("RetiredBranches");
@@ -400,7 +401,7 @@
 }

 void
-BaseCPU::probeInstCommit(const StaticInstPtr )
+BaseCPU::probeInstCommit(const StaticInstPtr , Addr pc)
 {
 if (!inst->isMicroop() || inst->isLastMicroop())
 ppRetiredInsts->notify(1);
@@ -414,6 +415,10 @@

 if (inst->isControl())
 ppRetiredBranches->notify(1);
+
+if (!inst->isMicroop() || inst->isLastMicroop()) {
+ppRetiredInstsPC->notify(pc);
+}
 }

 void
diff --git a/src/cpu/base.hh b/src/cpu/base.hh
index 9075d4b..f9b24b9 100644
--- a/src/cpu/base.hh
+++ b/src/cpu/base.hh
@@ -487,8 +487,9 @@
  * instruction.
  *
  * @param inst Instruction that just committed
+ * @param pc PC of the instruction that just committed
  */
-virtual void probeInstCommit(const StaticInstPtr );
+virtual void probeInstCommit(const StaticInstPtr , Addr pc);

protected:
 /**
@@ -509,6 +510,7 @@
  * instructions may call notify once for the entire bundle.
  */
 ProbePoints::PMUUPtr ppRetiredInsts;
+ProbePoints::PMUUPtr ppRetiredInstsPC;

 /** Retired load instructions */
 ProbePoints::PMUUPtr ppRetiredLoads;
diff --git a/src/cpu/minor/execute.cc b/src/cpu/minor/execute.cc
index 6a41820..47f3cbc 100644
--- a/src/cpu/minor/execute.cc
+++ b/src/cpu/minor/execute.cc
@@ -872,7 +872,7 @@
 if (inst->traceData)
 inst->traceData->setCPSeq(thread->numOp);

-cpu.probeInstCommit(inst->staticInst);
+cpu.probeInstCommit(inst->staticInst, inst->pc.instAddr());
 }

 bool
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 965ab04..9da5b43 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -1623,7 +1623,7 @@
 thread[tid]->numOps++;
 committedOps[tid]++;

-probeInstCommit(inst->staticInst);
+probeInstCommit(inst->staticInst, inst->instAddr());
 }

 template 
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc
index 422c732..b243dcc 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -661,7 +661,7 @@
 }

 // Call CPU instruction commit probes
-probeInstCommit(curStaticInst);
+probeInstCommit(curStaticInst, instAddr);
 }

 void

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/17632
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Iefc1b09d74b3aa0aa5773b17ba637bf51f5a59c9
Gerrit-Change-Number: 17632
Gerrit-PatchSet: 1
Gerrit-Owner: Javier Bueno Hedo 
Gerrit-MessageType: newchange
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev