base-stats,misc: Rename Stats namespace as statistics
As part of recent decisions regarding namespace naming conventions, all namespaces will be changed to snake case. ::Stats became ::statistics. "statistics" was chosen over "stats" to avoid generating conflicts with the already existing variables (there are way too many "stats" in the codebase), which would make this patch even more disturbing for the users. Change-Id: If877b12d7dac356f86e3b3d941bf7558a4fd8719 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45421 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
fa505f1c23
commit
98ac080ec4
@@ -67,29 +67,29 @@ BPredUnit::BPredUnit(const Params ¶ms)
|
||||
r.init(params.RASSize);
|
||||
}
|
||||
|
||||
BPredUnit::BPredUnitStats::BPredUnitStats(Stats::Group *parent)
|
||||
: Stats::Group(parent),
|
||||
ADD_STAT(lookups, Stats::units::Count::get(), "Number of BP lookups"),
|
||||
ADD_STAT(condPredicted, Stats::units::Count::get(),
|
||||
BPredUnit::BPredUnitStats::BPredUnitStats(statistics::Group *parent)
|
||||
: statistics::Group(parent),
|
||||
ADD_STAT(lookups, statistics::units::Count::get(), "Number of BP lookups"),
|
||||
ADD_STAT(condPredicted, statistics::units::Count::get(),
|
||||
"Number of conditional branches predicted"),
|
||||
ADD_STAT(condIncorrect, Stats::units::Count::get(),
|
||||
ADD_STAT(condIncorrect, statistics::units::Count::get(),
|
||||
"Number of conditional branches incorrect"),
|
||||
ADD_STAT(BTBLookups, Stats::units::Count::get(),
|
||||
ADD_STAT(BTBLookups, statistics::units::Count::get(),
|
||||
"Number of BTB lookups"),
|
||||
ADD_STAT(BTBHits, Stats::units::Count::get(), "Number of BTB hits"),
|
||||
ADD_STAT(BTBHitRatio, Stats::units::Ratio::get(), "BTB Hit Ratio",
|
||||
ADD_STAT(BTBHits, statistics::units::Count::get(), "Number of BTB hits"),
|
||||
ADD_STAT(BTBHitRatio, statistics::units::Ratio::get(), "BTB Hit Ratio",
|
||||
BTBHits / BTBLookups),
|
||||
ADD_STAT(RASUsed, Stats::units::Count::get(),
|
||||
ADD_STAT(RASUsed, statistics::units::Count::get(),
|
||||
"Number of times the RAS was used to get a target."),
|
||||
ADD_STAT(RASIncorrect, Stats::units::Count::get(),
|
||||
ADD_STAT(RASIncorrect, statistics::units::Count::get(),
|
||||
"Number of incorrect RAS predictions."),
|
||||
ADD_STAT(indirectLookups, Stats::units::Count::get(),
|
||||
ADD_STAT(indirectLookups, statistics::units::Count::get(),
|
||||
"Number of indirect predictor lookups."),
|
||||
ADD_STAT(indirectHits, Stats::units::Count::get(),
|
||||
ADD_STAT(indirectHits, statistics::units::Count::get(),
|
||||
"Number of indirect target hits."),
|
||||
ADD_STAT(indirectMisses, Stats::units::Count::get(),
|
||||
ADD_STAT(indirectMisses, statistics::units::Count::get(),
|
||||
"Number of indirect misses."),
|
||||
ADD_STAT(indirectMispredicted, Stats::units::Count::get(),
|
||||
ADD_STAT(indirectMispredicted, statistics::units::Count::get(),
|
||||
"Number of mispredicted indirect branches.")
|
||||
{
|
||||
BTBHitRatio.precision(6);
|
||||
|
||||
@@ -278,35 +278,35 @@ class BPredUnit : public SimObject
|
||||
/** The indirect target predictor. */
|
||||
IndirectPredictor * iPred;
|
||||
|
||||
struct BPredUnitStats : public Stats::Group
|
||||
struct BPredUnitStats : public statistics::Group
|
||||
{
|
||||
BPredUnitStats(Stats::Group *parent);
|
||||
BPredUnitStats(statistics::Group *parent);
|
||||
|
||||
/** Stat for number of BP lookups. */
|
||||
Stats::Scalar lookups;
|
||||
statistics::Scalar lookups;
|
||||
/** Stat for number of conditional branches predicted. */
|
||||
Stats::Scalar condPredicted;
|
||||
statistics::Scalar condPredicted;
|
||||
/** Stat for number of conditional branches predicted incorrectly. */
|
||||
Stats::Scalar condIncorrect;
|
||||
statistics::Scalar condIncorrect;
|
||||
/** Stat for number of BTB lookups. */
|
||||
Stats::Scalar BTBLookups;
|
||||
statistics::Scalar BTBLookups;
|
||||
/** Stat for number of BTB hits. */
|
||||
Stats::Scalar BTBHits;
|
||||
statistics::Scalar BTBHits;
|
||||
/** Stat for the ratio between BTB hits and BTB lookups. */
|
||||
Stats::Formula BTBHitRatio;
|
||||
statistics::Formula BTBHitRatio;
|
||||
/** Stat for number of times the RAS is used to get a target. */
|
||||
Stats::Scalar RASUsed;
|
||||
statistics::Scalar RASUsed;
|
||||
/** Stat for number of times the RAS is incorrect. */
|
||||
Stats::Scalar RASIncorrect;
|
||||
statistics::Scalar RASIncorrect;
|
||||
|
||||
/** Stat for the number of indirect target lookups.*/
|
||||
Stats::Scalar indirectLookups;
|
||||
statistics::Scalar indirectLookups;
|
||||
/** Stat for the number of indirect target hits.*/
|
||||
Stats::Scalar indirectHits;
|
||||
statistics::Scalar indirectHits;
|
||||
/** Stat for the number of indirect target misses.*/
|
||||
Stats::Scalar indirectMisses;
|
||||
statistics::Scalar indirectMisses;
|
||||
/** Stat for the number of indirect target mispredictions.*/
|
||||
Stats::Scalar indirectMispredicted;
|
||||
statistics::Scalar indirectMispredicted;
|
||||
} stats;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -345,12 +345,13 @@ LoopPredictor::condBranchUpdate(ThreadID tid, Addr branch_pc, bool taken,
|
||||
loopUpdate(branch_pc, taken, bi, tage_pred);
|
||||
}
|
||||
|
||||
LoopPredictor::LoopPredictorStats::LoopPredictorStats(Stats::Group *parent)
|
||||
: Stats::Group(parent),
|
||||
ADD_STAT(correct, Stats::units::Count::get(),
|
||||
LoopPredictor::LoopPredictorStats::LoopPredictorStats(
|
||||
statistics::Group *parent)
|
||||
: statistics::Group(parent),
|
||||
ADD_STAT(correct, statistics::units::Count::get(),
|
||||
"Number of times the loop predictor is the provider and the "
|
||||
"prediction is correct"),
|
||||
ADD_STAT(wrong, Stats::units::Count::get(),
|
||||
ADD_STAT(wrong, statistics::units::Count::get(),
|
||||
"Number of times the loop predictor is the provider and the "
|
||||
"prediction is wrong")
|
||||
{
|
||||
|
||||
@@ -83,11 +83,11 @@ class LoopPredictor : public SimObject
|
||||
const unsigned initialLoopAge;
|
||||
const bool optionalAgeReset;
|
||||
|
||||
struct LoopPredictorStats : public Stats::Group
|
||||
struct LoopPredictorStats : public statistics::Group
|
||||
{
|
||||
LoopPredictorStats(Stats::Group *parent);
|
||||
Stats::Scalar correct;
|
||||
Stats::Scalar wrong;
|
||||
LoopPredictorStats(statistics::Group *parent);
|
||||
statistics::Scalar correct;
|
||||
statistics::Scalar wrong;
|
||||
} stats;
|
||||
|
||||
/**
|
||||
|
||||
@@ -398,12 +398,12 @@ StatisticalCorrector::getSizeInBits() const
|
||||
}
|
||||
|
||||
StatisticalCorrector::StatisticalCorrectorStats::StatisticalCorrectorStats(
|
||||
Stats::Group *parent)
|
||||
: Stats::Group(parent),
|
||||
ADD_STAT(correct, Stats::units::Count::get(),
|
||||
statistics::Group *parent)
|
||||
: statistics::Group(parent),
|
||||
ADD_STAT(correct, statistics::units::Count::get(),
|
||||
"Number of time the SC predictor is the provider and the "
|
||||
"prediction is correct"),
|
||||
ADD_STAT(wrong, Stats::units::Count::get(),
|
||||
ADD_STAT(wrong, statistics::units::Count::get(),
|
||||
"Number of time the SC predictor is the provider and the "
|
||||
"prediction is wrong")
|
||||
{
|
||||
|
||||
@@ -183,11 +183,11 @@ class StatisticalCorrector : public SimObject
|
||||
int8_t firstH;
|
||||
int8_t secondH;
|
||||
|
||||
struct StatisticalCorrectorStats : public Stats::Group
|
||||
struct StatisticalCorrectorStats : public statistics::Group
|
||||
{
|
||||
StatisticalCorrectorStats(Stats::Group *parent);
|
||||
Stats::Scalar correct;
|
||||
Stats::Scalar wrong;
|
||||
StatisticalCorrectorStats(statistics::Group *parent);
|
||||
statistics::Scalar correct;
|
||||
statistics::Scalar wrong;
|
||||
} stats;
|
||||
|
||||
public:
|
||||
|
||||
@@ -717,41 +717,41 @@ TAGEBase::getGHR(ThreadID tid, BranchInfo *bi) const
|
||||
}
|
||||
|
||||
TAGEBase::TAGEBaseStats::TAGEBaseStats(
|
||||
Stats::Group *parent, unsigned nHistoryTables)
|
||||
: Stats::Group(parent),
|
||||
ADD_STAT(longestMatchProviderCorrect, Stats::units::Count::get(),
|
||||
statistics::Group *parent, unsigned nHistoryTables)
|
||||
: statistics::Group(parent),
|
||||
ADD_STAT(longestMatchProviderCorrect, statistics::units::Count::get(),
|
||||
"Number of times TAGE Longest Match is the provider and the "
|
||||
"prediction is correct"),
|
||||
ADD_STAT(altMatchProviderCorrect, Stats::units::Count::get(),
|
||||
ADD_STAT(altMatchProviderCorrect, statistics::units::Count::get(),
|
||||
"Number of times TAGE Alt Match is the provider and the "
|
||||
"prediction is correct"),
|
||||
ADD_STAT(bimodalAltMatchProviderCorrect, Stats::units::Count::get(),
|
||||
ADD_STAT(bimodalAltMatchProviderCorrect, statistics::units::Count::get(),
|
||||
"Number of times TAGE Alt Match is the bimodal and it is the "
|
||||
"provider and the prediction is correct"),
|
||||
ADD_STAT(bimodalProviderCorrect, Stats::units::Count::get(),
|
||||
ADD_STAT(bimodalProviderCorrect, statistics::units::Count::get(),
|
||||
"Number of times there are no hits on the TAGE tables and the "
|
||||
"bimodal prediction is correct"),
|
||||
ADD_STAT(longestMatchProviderWrong, Stats::units::Count::get(),
|
||||
ADD_STAT(longestMatchProviderWrong, statistics::units::Count::get(),
|
||||
"Number of times TAGE Longest Match is the provider and the "
|
||||
"prediction is wrong"),
|
||||
ADD_STAT(altMatchProviderWrong, Stats::units::Count::get(),
|
||||
ADD_STAT(altMatchProviderWrong, statistics::units::Count::get(),
|
||||
"Number of times TAGE Alt Match is the provider and the "
|
||||
"prediction is wrong"),
|
||||
ADD_STAT(bimodalAltMatchProviderWrong, Stats::units::Count::get(),
|
||||
ADD_STAT(bimodalAltMatchProviderWrong, statistics::units::Count::get(),
|
||||
"Number of times TAGE Alt Match is the bimodal and it is the "
|
||||
"provider and the prediction is wrong"),
|
||||
ADD_STAT(bimodalProviderWrong, Stats::units::Count::get(),
|
||||
ADD_STAT(bimodalProviderWrong, statistics::units::Count::get(),
|
||||
"Number of times there are no hits on the TAGE tables and the "
|
||||
"bimodal prediction is wrong"),
|
||||
ADD_STAT(altMatchProviderWouldHaveHit, Stats::units::Count::get(),
|
||||
ADD_STAT(altMatchProviderWouldHaveHit, statistics::units::Count::get(),
|
||||
"Number of times TAGE Longest Match is the provider, the "
|
||||
"prediction is wrong and Alt Match prediction was correct"),
|
||||
ADD_STAT(longestMatchProviderWouldHaveHit, Stats::units::Count::get(),
|
||||
ADD_STAT(longestMatchProviderWouldHaveHit, statistics::units::Count::get(),
|
||||
"Number of times TAGE Alt Match is the provider, the "
|
||||
"prediction is wrong and Longest Match prediction was correct"),
|
||||
ADD_STAT(longestMatchProvider, Stats::units::Count::get(),
|
||||
ADD_STAT(longestMatchProvider, statistics::units::Count::get(),
|
||||
"TAGE provider for longest match"),
|
||||
ADD_STAT(altMatchProvider, Stats::units::Count::get(),
|
||||
ADD_STAT(altMatchProvider, statistics::units::Count::get(),
|
||||
"TAGE provider for alt match")
|
||||
{
|
||||
longestMatchProvider.init(nHistoryTables + 1);
|
||||
|
||||
@@ -485,23 +485,23 @@ class TAGEBase : public SimObject
|
||||
|
||||
bool initialized;
|
||||
|
||||
struct TAGEBaseStats : public Stats::Group
|
||||
struct TAGEBaseStats : public statistics::Group
|
||||
{
|
||||
TAGEBaseStats(Stats::Group *parent, unsigned nHistoryTables);
|
||||
TAGEBaseStats(statistics::Group *parent, unsigned nHistoryTables);
|
||||
// stats
|
||||
Stats::Scalar longestMatchProviderCorrect;
|
||||
Stats::Scalar altMatchProviderCorrect;
|
||||
Stats::Scalar bimodalAltMatchProviderCorrect;
|
||||
Stats::Scalar bimodalProviderCorrect;
|
||||
Stats::Scalar longestMatchProviderWrong;
|
||||
Stats::Scalar altMatchProviderWrong;
|
||||
Stats::Scalar bimodalAltMatchProviderWrong;
|
||||
Stats::Scalar bimodalProviderWrong;
|
||||
Stats::Scalar altMatchProviderWouldHaveHit;
|
||||
Stats::Scalar longestMatchProviderWouldHaveHit;
|
||||
statistics::Scalar longestMatchProviderCorrect;
|
||||
statistics::Scalar altMatchProviderCorrect;
|
||||
statistics::Scalar bimodalAltMatchProviderCorrect;
|
||||
statistics::Scalar bimodalProviderCorrect;
|
||||
statistics::Scalar longestMatchProviderWrong;
|
||||
statistics::Scalar altMatchProviderWrong;
|
||||
statistics::Scalar bimodalAltMatchProviderWrong;
|
||||
statistics::Scalar bimodalProviderWrong;
|
||||
statistics::Scalar altMatchProviderWouldHaveHit;
|
||||
statistics::Scalar longestMatchProviderWouldHaveHit;
|
||||
|
||||
Stats::Vector longestMatchProvider;
|
||||
Stats::Vector altMatchProvider;
|
||||
statistics::Vector longestMatchProvider;
|
||||
statistics::Vector altMatchProvider;
|
||||
} stats;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user