_pid(params.pid), _ppid(params.ppid),
_pgid(params.pgid), drivers(params.drivers),
fds(make_shared<FDArray>(params.input, params.output, params.errout)),
- childClearTID(0)
+ childClearTID(0),
+ ADD_STAT(numSyscalls, "Number of system calls")
{
if (_pid >= System::maxPID)
fatal("_pid is too large: %d", _pid);
np->envp.insert(np->envp.end(), envp.begin(), envp.end());
}
-void
-Process::regStats()
-{
- SimObject::regStats();
-
- using namespace Stats;
-
- numSyscalls
- .name(name() + ".numSyscalls")
- .desc("Number of system calls")
- ;
-}
-
void
Process::revokeThreadContext(int context_id)
{
Addr getStartPC();
::Loader::ObjectFile *getInterpreter();
- // override of virtual SimObject method: register statistics
- void regStats() override;
-
void allocateMem(Addr vaddr, int64_t size, bool clobber = false);
/// Attempt to fix up a fault at vaddr by allocating a page on the stack.
// system object which owns this process
System *system;
- Stats::Scalar numSyscalls; // track how many system calls are executed
-
// flag for using architecture specific page table
bool useArchPT;
// running KVM requires special initialization
// Process was forked with SIGCHLD set.
bool *sigchld;
+
+ Stats::Scalar numSyscalls; // track how many system calls are executed
};
#endif // __PROCESS_HH__
SimObject::regStats();
for (uint32_t j = 0; j < numWorkIds ; j++) {
- workItemStats[j] = new Stats::Histogram();
+ workItemStats[j] = new Stats::Histogram(this);
stringstream namestr;
ccprintf(namestr, "work_item_type%d", j);
workItemStats[j]->init(20)