From: Hoa Nguyen Date: Fri, 5 Feb 2021 05:50:18 +0000 (-0800) Subject: arch-riscv: Fixed the style of stats variable names in TlbStats X-Git-Tag: develop-gem5-snapshot~107 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=26d2731e5f57e86eb99b1a9967abca8afb37a263;p=gem5.git arch-riscv: Fixed the style of stats variable names in TlbStats The variable names should be of camel case style. Change-Id: I397c9f165a53ecc120ec57f7214c90a65e12407e Signed-off-by: Hoa Nguyen Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40695 Tested-by: kokoro Reviewed-by: Bobby R. Bruce Reviewed-by: Daniel Carvalho Maintainer: Bobby R. Bruce --- diff --git a/src/arch/riscv/tlb.cc b/src/arch/riscv/tlb.cc index 84eb6e2bf..8001d8378 100644 --- a/src/arch/riscv/tlb.cc +++ b/src/arch/riscv/tlb.cc @@ -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) { } diff --git a/src/arch/riscv/tlb.hh b/src/arch/riscv/tlb.hh index cb6059e17..ef957be90 100644 --- a/src/arch/riscv/tlb.hh +++ b/src/arch/riscv/tlb.hh @@ -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;