47 intervalSize(
p.interval),
52 currentBBVInstCount(0)
56 fatal(
"unable to open SimPoint profile_file");
73 listeners.push_back(
new SimPointListener(
this,
"Commit",
97 if (map_itr ==
bbMap.end()){
109 BBInfo& info = map_itr->second;
120 for (
auto map_itr =
bbMap.begin(); map_itr !=
bbMap.end();
122 BBInfo& info = map_itr->second;
123 if (info.
count != 0) {
124 counts.push_back(std::make_pair(info.
id, info.
count));
128 std::sort(counts.begin(), counts.end());
132 for (
auto cnt_itr = counts.begin(); cnt_itr != counts.end();
135 <<
":" << cnt_itr->second <<
" ";
void close(OutputStream *file)
Closes an output file and free the corresponding OutputFile.
OutputStream * create(const std::string &name, bool binary=false, bool no_gz=false)
Creates a file in this directory (optionally compressed).
std::ostream * stream() const
Get the output underlying output stream.
Addr instAddr() const
Returns the memory address of the instruction this PC points to.
ProbeListenerArg generates a listener for the class of Arg and the class type T which is the class co...
This class is a minimal wrapper around SimObject.
std::vector< ProbeListener * > listeners
virtual void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
uint64_t intervalDrift
Excess inst count from previous interval.
void profile(const std::pair< SimpleThread *, StaticInstPtr > &)
Profile basic blocks for SimPoints.
OutputStream * simpointStream
Pointer to SimPoint BBV output stream.
std::unordered_map< BasicBlockRange, BBInfo > bbMap
Hash table containing all previously seen basic blocks.
uint64_t currentBBVInstCount
inst count in current basic block
SimPoint(const SimPointParams ¶ms)
const uint64_t intervalSize
SimPoint profiling interval size in instructions.
uint64_t intervalCount
Inst count in current basic block.
virtual void regProbeListeners()
Register probe listeners for this object.
BasicBlockRange currentBBV
Currently executing basic block.
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
const PCStateBase & pcState() const override
bool isLastMicroop() const
#define fatal(...)
This implements a cprintf based fatal() function.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t insts
Num of static insts in BB.
uint64_t count
Accumulated dynamic inst count executed by BB.