45a46
> #include "base/hashmap.hh"
48a50,70
> /**
> * Start and end address of basic block for SimPoint profiling.
> * This structure is used to look up the hash table of BBVs.
> * - first: PC of first inst in basic block
> * - second: PC of last inst in basic block
> */
> typedef std::pair<Addr, Addr> BasicBlockRange;
>
> /** Overload hash function for BasicBlockRange type */
> __hash_namespace_begin
> template <>
> class hash<BasicBlockRange>
> {
> public:
> size_t operator()(const BasicBlockRange &bb) const {
> return hash<Addr>()(bb.first + bb.second);
> }
> };
> __hash_namespace_end
>
>
163a186,229
> /**
> * Profile basic blocks for SimPoints.
> * Called at every macro inst to increment basic block inst counts and
> * to profile block if end of block.
> */
> void profileSimPoint();
>
> /** Data structures for SimPoints BBV generation
> * @{
> */
>
> /** Whether SimPoint BBV profiling is enabled */
> const bool simpoint;
> /** SimPoint profiling interval size in instructions */
> const uint64_t intervalSize;
>
> /** Inst count in current basic block */
> uint64_t intervalCount;
> /** Excess inst count from previous interval*/
> uint64_t intervalDrift;
> /** Pointer to SimPoint BBV output stream */
> std::ostream *simpointStream;
>
> /** Basic Block information */
> struct BBInfo {
> /** Unique ID */
> uint64_t id;
> /** Num of static insts in BB */
> uint64_t insts;
> /** Accumulated dynamic inst count executed by BB */
> uint64_t count;
> };
>
> /** Hash table containing all previously seen basic blocks */
> m5::hash_map<BasicBlockRange, BBInfo> bbMap;
> /** Currently executing basic block */
> BasicBlockRange currentBBV;
> /** inst count in current basic block */
> uint64_t currentBBVInstCount;
>
> /** @}
> * End of data structures for SimPoints BBV generation
> */
>