/*
- * Copyright (c) 2013-2014 ARM Limited
+ * Copyright (c) 2013-2014,2016 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
dyn_inst->pc = fetch_info.pc;
DPRINTF(Fetch, "decoder inst %s\n", *dyn_inst);
+ // Collect some basic inst class stats
+ if (decoded_inst->isLoad())
+ loadInstructions++;
+ else if (decoded_inst->isStore())
+ storeInstructions++;
+ else if (decoded_inst->isVector())
+ vecInstructions++;
+ else if (decoded_inst->isFloating())
+ fpInstructions++;
+ else if (decoded_inst->isInteger())
+ intInstructions++;
DPRINTF(Fetch, "Instruction extracted from line %s"
" lineWidth: %d output_index: %d inputIndex: %d"
(*predictionOut.inputWire).isBubble();
}
+void
+Fetch2::regStats()
+{
+ using namespace Stats;
+
+ intInstructions
+ .name(name() + ".int_instructions")
+ .desc("Number of integer instructions successfully decoded")
+ .flags(total);
+
+ fpInstructions
+ .name(name() + ".fp_instructions")
+ .desc("Number of floating point instructions successfully decoded")
+ .flags(total);
+
+ vecInstructions
+ .name(name() + ".vec_instructions")
+ .desc("Number of SIMD instructions successfully decoded")
+ .flags(total);
+
+ loadInstructions
+ .name(name() + ".load_instructions")
+ .desc("Number of memory load instructions successfully decoded")
+ .flags(total);
+
+ storeInstructions
+ .name(name() + ".store_instructions")
+ .desc("Number of memory store instructions successfully decoded")
+ .flags(total);
+}
+
void
Fetch2::minorTrace() const
{
std::vector<Fetch2ThreadInfo> fetchInfo;
ThreadID threadPriority;
+ /** Stats */
+ Stats::Scalar intInstructions;
+ Stats::Scalar fpInstructions;
+ Stats::Scalar vecInstructions;
+ Stats::Scalar loadInstructions;
+ Stats::Scalar storeInstructions;
+
protected:
/** Get a piece of data to work on from the inputBuffer, or 0 if there
* is no data. */
void minorTrace() const;
+ void regStats();
+
/** Is this stage drained? For Fetch2, draining is initiated by
* Execute halting Fetch1 causing Fetch2 to naturally drain.
* Branch predictions are ignored by Fetch1 during halt */