[gem5-dev] [S] Change in gem5/gem5[develop]: gpu-compute : Fix incorrect TLB stats when FunctionalTLB is used

2023-01-09 Thread VISHNU RAMADAS (Gerrit) via gem5-dev
VISHNU RAMADAS has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/67202?usp=email )


Change subject: gpu-compute : Fix incorrect TLB stats when FunctionalTLB is  
used

..

gpu-compute : Fix incorrect TLB stats when FunctionalTLB is used

When FunctionalTLB is used in SE mode, the stats tlbLatency and
tlbCycles report negative values. This patch fixes it by disabling the
updates that result in negative values when FunctionalTLB is set to true

Change-Id: I6962785fc1730b166b6d5b879e9c7618a8d6d4b3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67202
Reviewed-by: Matt Sinclair 
Maintainer: Matt Sinclair 
Maintainer: Matthew Poremba 
Reviewed-by: Matthew Poremba 
Tested-by: kokoro 
---
M src/gpu-compute/compute_unit.cc
1 file changed, 22 insertions(+), 1 deletion(-)

Approvals:
  kokoro: Regressions pass
  Matt Sinclair: Looks good to me, approved
  Matthew Poremba: Looks good to me, approved; Looks good to me, approved
  Matt Sinclair: Looks good to me, approved




diff --git a/src/gpu-compute/compute_unit.cc  
b/src/gpu-compute/compute_unit.cc

index 62cfbf9..06fe28f 100644
--- a/src/gpu-compute/compute_unit.cc
+++ b/src/gpu-compute/compute_unit.cc
@@ -1078,7 +1078,9 @@
 fatal("pkt is not a read nor a write\n");
 }

-stats.tlbCycles -= curTick();
+if (!functionalTLB) {
+stats.tlbCycles -= curTick();
+}
 ++stats.tlbRequests;

 PortID tlbPort_index = perLaneTLB ? index : 0;

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


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I6962785fc1730b166b6d5b879e9c7618a8d6d4b3
Gerrit-Change-Number: 67202
Gerrit-PatchSet: 2
Gerrit-Owner: VISHNU RAMADAS 
Gerrit-Reviewer: Matt Sinclair 
Gerrit-Reviewer: Matt Sinclair 
Gerrit-Reviewer: Matthew Poremba 
Gerrit-Reviewer: VISHNU RAMADAS 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org


[gem5-dev] [S] Change in gem5/gem5[develop]: gpu-compute : Fix incorrect TLB stats when FunctionalTLB is used

2023-01-09 Thread VISHNU RAMADAS (Gerrit) via gem5-dev
VISHNU RAMADAS has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/67202?usp=email )



Change subject: gpu-compute : Fix incorrect TLB stats when FunctionalTLB is  
used

..

gpu-compute : Fix incorrect TLB stats when FunctionalTLB is used

When FunctionalTLB is used in SE mode, the stats tlbLatency and
tlbCycles report negative values. This patch fixes it by disabling the
updates that result in negative values when FunctionalTLB is set to true

Change-Id: I6962785fc1730b166b6d5b879e9c7618a8d6d4b3
---
M src/gpu-compute/compute_unit.cc
1 file changed, 16 insertions(+), 1 deletion(-)



diff --git a/src/gpu-compute/compute_unit.cc  
b/src/gpu-compute/compute_unit.cc

index 62cfbf9..06fe28f 100644
--- a/src/gpu-compute/compute_unit.cc
+++ b/src/gpu-compute/compute_unit.cc
@@ -1078,7 +1078,9 @@
 fatal("pkt is not a read nor a write\n");
 }

-stats.tlbCycles -= curTick();
+if (!functionalTLB) {
+stats.tlbCycles -= curTick();
+}
 ++stats.tlbRequests;

 PortID tlbPort_index = perLaneTLB ? index : 0;

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


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I6962785fc1730b166b6d5b879e9c7618a8d6d4b3
Gerrit-Change-Number: 67202
Gerrit-PatchSet: 1
Gerrit-Owner: VISHNU RAMADAS 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org