arch-riscv: Fixed the style of stats variable names in TlbStats
authorHoa Nguyen <hoanguyen@ucdavis.edu>
Fri, 5 Feb 2021 05:50:18 +0000 (21:50 -0800)
committerHoa Nguyen <hoanguyen@ucdavis.edu>
Wed, 10 Feb 2021 09:03:09 +0000 (09:03 +0000)
The variable names should be of camel case style.

Change-Id: I397c9f165a53ecc120ec57f7214c90a65e12407e
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40695
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>

src/arch/riscv/tlb.cc
src/arch/riscv/tlb.hh

index 84eb6e2bff51587bae246513f85c39c7e4d332d0..8001d8378394dabf40bc78963f7cf6f9c4ca6710 100644 (file)
@@ -108,21 +108,21 @@ TLB::lookup(Addr vpn, uint16_t asid, Mode mode, bool hidden)
             entry->lruSeq = nextSeq();
 
         if (mode == Write)
-            stats.write_accesses++;
+            stats.writeAccesses++;
         else
-            stats.read_accesses++;
+            stats.readAccesses++;
 
         if (!entry) {
             if (mode == Write)
-                stats.write_misses++;
+                stats.writeMisses++;
             else
-                stats.read_misses++;
+                stats.readMisses++;
         }
         else {
             if (mode == Write)
-                stats.write_hits++;
+                stats.writeHits++;
             else
-                stats.read_hits++;
+                stats.readHits++;
         }
 
         DPRINTF(TLBVerbose, "lookup(vpn=%#x, asid=%#x): %s ppn %#x\n",
@@ -498,17 +498,17 @@ TLB::unserialize(CheckpointIn &cp)
 
 TLB::TlbStats::TlbStats(Stats::Group *parent)
   : Stats::Group(parent),
-    ADD_STAT(read_hits, UNIT_COUNT, "read hits"),
-    ADD_STAT(read_misses, UNIT_COUNT, "read misses"),
-    ADD_STAT(read_accesses, UNIT_COUNT, "read accesses"),
-    ADD_STAT(write_hits, UNIT_COUNT, "write hits"),
-    ADD_STAT(write_misses, UNIT_COUNT, "write misses"),
-    ADD_STAT(write_accesses, UNIT_COUNT, "write accesses"),
+    ADD_STAT(readHits, UNIT_COUNT, "read hits"),
+    ADD_STAT(readMisses, UNIT_COUNT, "read misses"),
+    ADD_STAT(readAccesses, UNIT_COUNT, "read accesses"),
+    ADD_STAT(writeHits, UNIT_COUNT, "write hits"),
+    ADD_STAT(writeMisses, UNIT_COUNT, "write misses"),
+    ADD_STAT(writeAccesses, UNIT_COUNT, "write accesses"),
     ADD_STAT(hits, UNIT_COUNT, "Total TLB (read and write) hits",
-             read_hits + write_hits),
+             readHits + writeHits),
     ADD_STAT(misses, UNIT_COUNT, "Total TLB (read and write) misses",
-             read_misses + write_misses),
+             readMisses + writeMisses),
     ADD_STAT(accesses, UNIT_COUNT, "Total TLB (read and write) accesses",
-             read_accesses + write_accesses)
+             readAccesses + writeAccesses)
 {
 }
index cb6059e1763caee5017c5d6947111595168e0174..ef957be90471716123cc58b3ae559f87ee1b17d9 100644 (file)
@@ -67,14 +67,14 @@ class TLB : public BaseTLB
     struct TlbStats : public Stats::Group{
         TlbStats(Stats::Group *parent);
 
-        Stats::Scalar read_hits;
-        Stats::Scalar read_misses;
+        Stats::Scalar readHits;
+        Stats::Scalar readMisses;
         Stats::Scalar read_acv;
-        Stats::Scalar read_accesses;
-        Stats::Scalar write_hits;
-        Stats::Scalar write_misses;
+        Stats::Scalar readAccesses;
+        Stats::Scalar writeHits;
+        Stats::Scalar writeMisses;
         Stats::Scalar write_acv;
-        Stats::Scalar write_accesses;
+        Stats::Scalar writeAccesses;
 
         Stats::Formula hits;
         Stats::Formula misses;